1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:40:03 +08:00

docs(go): update :h SpaceVim-layers-lang-go

This commit is contained in:
Eric Wong 2024-05-26 21:35:26 +08:00
parent 5130094e91
commit 6d7ebe6891
2 changed files with 48 additions and 0 deletions

View File

@ -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.

View File

@ -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.