vimrc: auto-organize Go imports

This commit is contained in:
Rob Watson 2021-04-23 03:45:00 +02:00
parent e593efc410
commit 41fa574f21
1 changed files with 1 additions and 0 deletions

1
vimrc
View File

@ -366,6 +366,7 @@ augroup lsp_install
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
autocmd User lsp_diagnostics_updated call lightline#update() autocmd User lsp_diagnostics_updated call lightline#update()
autocmd BufWritePre *.go silent LspDocumentFormatSync autocmd BufWritePre *.go silent LspDocumentFormatSync
autocmd BufWritePre *.go silent LspCodeActionSync source.organizeImports
" autocmd CursorHold <buffer> silent LspHover " autocmd CursorHold <buffer> silent LspHover
augroup END augroup END