Skip to content

Instantly share code, notes, and snippets.

View ocidenttal's full-sized avatar
💭
I may be slow to respond.

mauro ocidenttal

💭
I may be slow to respond.
View GitHub Profile
@ocidenttal
ocidenttal / coc_gopls_error_fix.vim
Created August 29, 2021 21:32
This solves the error message raised by coc.nvim with gopls language server when the imports are already organized.
" 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')