This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" instead of this | |
" (this will send error messages to your vim/neovim everytime you save a .go file | |
" and the imports are already organized) | |
autocmd! BufWritePre *.go :call CocAction('runCommand', 'editor.action.organizeImport') | |
" use the `silent` command before `call` | |
autocmd BufWritePre *.go :silent call CocAction('runCommand', 'editor.action.organizeImport') |