mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 16:50:05 +08:00
23 lines
528 B
Lua
23 lines
528 B
Lua
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")]],
|
|
},
|
|
},
|
|
}
|