Vimrc fixes

This commit is contained in:
Rob Watson 2021-03-18 13:30:30 +01:00
parent 69061dfe7f
commit 25c4b1fffb
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,8 @@
nmap <silent> gvd <Plug>(go-def-vertical)
nmap <silent> gsd <Plug>(go-def-split)
nmap <silent> gvD <Plug>(go-def-type-vertical)
nmap <silent> gsD <Plug>(go-def-type-split)
nmap <silent> <leader>gb :up<bar>:GoBuild<cr>
nmap <silent> <leader>gr :up<bar>:GoRun<cr>
nmap <silent> <leader>gc :GoCallers<cr>

14
vimrc
View File

@ -94,6 +94,9 @@ augroup vimrc
autocmd InsertLeavePre * set nocul
" use tabs in .gitconfig
autocmd BufEnter .gitconfig setlocal shiftwidth=2 tabstop=2 noexpandtab
" Quickfix window is always full-width.
" https://github.com/fatih/vim-go/issues/1757#issuecomment-565130503
autocmd FileType qf if (getwininfo(win_getid())[0].loclist != 1) | wincmd J | endif
augroup end
" But, don't remember the current directory for a given file:
@ -139,13 +142,14 @@ nmap <silent> <leader>l :lclose<cr>
" deoplete configuration
packadd! deoplete.nvim
" Disable completion messages:
set shortmess+=c
let g:deoplete#enable_at_startup = 1
call deoplete#custom#option('num_processes', 6)
call deoplete#custom#option('max_list', 50)
call deoplete#custom#option('auto_complete_delay', 10)
call deoplete#custom#option('auto_refresh_delay', 10)
" https://github.com/Shougo/deoplete.nvim/issues/965#issuecomment-482925193
" Seems to be causing autocomplete issues so removing for now.
call deoplete#custom#option('max_list', 250)
call deoplete#custom#option('auto_complete_delay', 0)
call deoplete#custom#option('auto_refresh_delay', 250)
call deoplete#custom#option('refresh_always', v:false)
call deoplete#custom#option('omni_patterns', {
\ 'go': '[^. *\t]\.\w*',
\})