Skip to content

Commit

Permalink
Register a FileChangedShellPost autocmd instead
Browse files Browse the repository at this point in the history
This prevents the autocmd from blocking the standard behavior of
prompting (autoread=0) or reloading (autoread=1) on detected
file change. (See :help timestamp)

Signed-off-by: Jared Cordasco <jcordasc@coglib.com>
  • Loading branch information
Jared Cordasco committed Oct 23, 2019
1 parent 2f7a00e commit 411721f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ftplugin/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ augroup vim-go-buffer
" 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 FileChangedShellPost <buffer> call go#lsp#DidChange(expand('<afile>:p'))
autocmd BufDelete <buffer> call go#lsp#DidClose(expand('<afile>:p'))
endif

Expand Down

0 comments on commit 411721f

Please sign in to comment.