mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated plugins
This commit is contained in:
@ -25,8 +25,11 @@ setlocal noexpandtab
|
||||
|
||||
compiler go
|
||||
|
||||
" Set gocode completion
|
||||
" Set autocompletion
|
||||
setlocal omnifunc=go#complete#Complete
|
||||
if !go#util#has_job()
|
||||
setlocal omnifunc=go#complete#GocodeComplete
|
||||
endif
|
||||
|
||||
if get(g:, "go_doc_keywordprg_enabled", 1)
|
||||
" keywordprg doesn't allow to use vim commands, override it
|
||||
@ -40,8 +43,8 @@ if get(g:, "go_def_mapping_enabled", 1)
|
||||
nnoremap <buffer> <silent> <C-]> :GoDef<cr>
|
||||
nnoremap <buffer> <silent> <C-LeftMouse> <LeftMouse>:GoDef<cr>
|
||||
nnoremap <buffer> <silent> g<LeftMouse> <LeftMouse>:GoDef<cr>
|
||||
nnoremap <buffer> <silent> <C-w><C-]> :<C-u>call go#def#Jump("split")<CR>
|
||||
nnoremap <buffer> <silent> <C-w>] :<C-u>call go#def#Jump("split")<CR>
|
||||
nnoremap <buffer> <silent> <C-w><C-]> :<C-u>call go#def#Jump("split", 0)<CR>
|
||||
nnoremap <buffer> <silent> <C-w>] :<C-u>call go#def#Jump("split", 0)<CR>
|
||||
nnoremap <buffer> <silent> <C-t> :<C-U>call go#def#StackPop(v:count1)<cr>
|
||||
endif
|
||||
|
||||
@ -79,6 +82,10 @@ endif
|
||||
augroup vim-go-buffer
|
||||
autocmd! * <buffer>
|
||||
|
||||
" TODO(bc): notify gopls about changes on CursorHold when the buffer is
|
||||
" modified.
|
||||
" TODO(bc): notify gopls that the file on disk is correct on BufWritePost
|
||||
|
||||
autocmd CursorHold <buffer> call go#auto#auto_type_info()
|
||||
autocmd CursorHold <buffer> call go#auto#auto_sameids()
|
||||
|
||||
|
Reference in New Issue
Block a user