blob: 0126b12793ae86a623a02db4c673f63977e7cb32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
configs.gopls = {
default_config = {
cmd = { 'gopls' },
filetypes = { 'go', 'gomod' },
root_dir = function(fname)
return util.root_pattern 'go.work'(fname) or util.root_pattern('go.mod', '.git')(fname)
end,
},
docs = {
description = [[
https://github.com/golang/tools/tree/master/gopls
Google's lsp server for golang.
]],
default_config = {
root_dir = [[root_pattern("go.mod", ".git")]],
},
},
}
|