diff --git a/autoload/SpaceVim/layers/lang/go.vim b/autoload/SpaceVim/layers/lang/go.vim index f1983e5c0..2d6b13b00 100644 --- a/autoload/SpaceVim/layers/lang/go.vim +++ b/autoload/SpaceVim/layers/lang/go.vim @@ -15,7 +15,31 @@ " [[layers]] " name = 'go' " < +" @subsection Language server +" +" There are two ways to setup the golang language server protocol. +" +" neovim(`>=0.5.0`) +" +" If you are using `nvim(>=0.5.0)`. You need to use `enabled_clients` option of `lsp` layer to specific the language servers. +" for example: +" > +" [[layers]] +" name = 'lsp' +" enabled_clients = ['gopls'] +" < +" vim or neovim(`<0.5.0`) +" +" To enable language server protocol support, you may need to enable lsp layer. +" > +" [[layers]] +" name = "lsp" +" filetypes = [ +" "go" +" ] +" < " @subsection layer options +" " 1. `enabled_linters`: set a list of enabled lint for golang. by default this " option is `['golangci_lint']`. The available linters includes: `go`, " `gometalinter`, etc. diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index e5de19f3f..41c4df44c 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -3187,7 +3187,31 @@ development. This layer is not enabled by default, to enable it: [[layers]] name = 'go' < +LANGUAGE SERVER + +There are two ways to setup the golang language server protocol. + +neovim(`>=0.5.0`) + +If you are using `nvim(>=0.5.0)`. You need to use `enabled_clients` option of +`lsp` layer to specific the language servers. for example: +> + [[layers]] + name = 'lsp' + enabled_clients = ['gopls'] +< +vim or neovim(`<0.5.0`) + +To enable language server protocol support, you may need to enable lsp layer. +> + [[layers]] + name = "lsp" + filetypes = [ + "go" + ] +< LAYER OPTIONS + 1. `enabled_linters`: set a list of enabled lint for golang. by default this option is `['golangci_lint']`. The available linters includes: `go`, `gometalinter`, etc.