diff --git a/gopls.md b/gopls.md index 4e87f415..b41a6b7b 100644 --- a/gopls.md +++ b/gopls.md @@ -146,6 +146,12 @@ Use [coc.nvim](https://github.com/neoclide/coc.nvim/), with the following `coc-s } ``` +To get automatic formatting and imports on save, add the following line to your `init.vim`: + +```vim +autocmd BufWritePre *.go :call CocAction("format") +``` + --- #### Vim (classic only)