diff --git a/gopls/doc/vim.md b/gopls/doc/vim.md index 431661c900..bbcef24eed 100644 --- a/gopls/doc/vim.md +++ b/gopls/doc/vim.md @@ -79,11 +79,16 @@ Use [coc.nvim], with the following `coc-settings.json` configuration: "golang": { "command": "gopls", "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], - "filetypes": ["go"] + "filetypes": ["go"], + "initializationOptions": { + "usePlaceholders": true + } } } ``` +Other [settings](settings.md) can be added in `initializationOptions` too. + The `editor.action.organizeImport` code action will auto-format code and add missing imports. To run this automatically on save, add the following line to your `init.vim`: ```vim