mirror of
https://github.com/amix/vimrc
synced 2025-07-27 23:45:00 +08:00
plugin updates
plugin updates
This commit is contained in:
@ -25,12 +25,10 @@ setlocal noexpandtab
|
||||
|
||||
compiler go
|
||||
|
||||
if go#config#CodeCompletionEnabled()
|
||||
" Set autocompletion
|
||||
setlocal omnifunc=go#complete#Complete
|
||||
if !go#util#has_job()
|
||||
setlocal omnifunc=go#complete#GocodeComplete
|
||||
endif
|
||||
" 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)
|
||||
@ -84,16 +82,9 @@ endif
|
||||
augroup vim-go-buffer
|
||||
autocmd! * <buffer>
|
||||
|
||||
" The file is registered (textDocument/DidOpen) with gopls in plugin/go.vim
|
||||
" on the FileType event.
|
||||
" TODO(bc): handle all the other events that may be of interest to gopls,
|
||||
" too (e.g. BufFilePost , CursorHold , CursorHoldI, FileReadPost,
|
||||
" StdinReadPre, BufWritePost, TextChange, TextChangedI)
|
||||
if go#util#has_job()
|
||||
autocmd BufWritePost <buffer> call go#lsp#DidChange(expand('<afile>:p'))
|
||||
autocmd FileChangedShell <buffer> call go#lsp#DidChange(expand('<afile>:p'))
|
||||
autocmd BufDelete <buffer> call go#lsp#DidClose(expand('<afile>:p'))
|
||||
endif
|
||||
" 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