gopls: update neovim documentation for using go.work

For golang/go#50955

Change-Id: I8882239868d060a444466a466d30c3de9aaa31ef
GitHub-Last-Rev: 6395f147165c7947eae50719fb03e65d95a4debf
GitHub-Pull-Request: golang/tools#370
Reviewed-on: https://go-review.googlesource.com/c/tools/+/388576
Trust: Nooras Saba‎ <saba@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Simon Drake 2022-03-01 17:39:56 +00:00 committed by Robert Findley
parent fb3622a928
commit 625c871d3c
1 changed files with 4 additions and 0 deletions

View File

@ -148,8 +148,12 @@ You can add custom configuration using Lua. Here is an example of enabling the
```vim
lua <<EOF
lspconfig = require "lspconfig"
util = require "lspconfig/util"
lspconfig.gopls.setup {
cmd = {"gopls", "serve"},
filetypes = {"go", "gomod"},
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
settings = {
gopls = {
analyses = {