Skip to content

Commit

Permalink
gopls/doc: instructions for adding settings in coc.nvim
Browse files Browse the repository at this point in the history
Change-Id: I7d69477cc103e8e45b0e9394e32945a0d8ee19b3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/200868
Reviewed-by: Ian Cottrell <iancottrell@google.com>
  • Loading branch information
zhsj authored and ianthehat committed Oct 14, 2019
1 parent 8de300c commit 5fa5b17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gopls/doc/vim.md
Expand Up @@ -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
Expand Down

0 comments on commit 5fa5b17

Please sign in to comment.