From 5fa5b1782b2c597541464a432bc01e7ff6de2c19 Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Mon, 14 Oct 2019 14:03:50 +0800 Subject: [PATCH] gopls/doc: instructions for adding settings in coc.nvim Change-Id: I7d69477cc103e8e45b0e9394e32945a0d8ee19b3 Reviewed-on: https://go-review.googlesource.com/c/tools/+/200868 Reviewed-by: Ian Cottrell --- gopls/doc/vim.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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