-
Notifications
You must be signed in to change notification settings - Fork 306
Servers Go
FUJIWARA Takuya edited this page Dec 12, 2019
·
30 revisions
Pick any one of the following servers.
go get -u golang.org/x/tools/cmd/gopls
go get -u github.com/sourcegraph/go-langserver
if executable('gopls')
au User lsp_setup call lsp#register_server({
\ 'name': 'gopls',
\ 'cmd': {server_info->['gopls', '-mode', 'stdio']},
\ 'whitelist': ['go'],
\ })
autocmd BufWritePre *.go LspDocumentFormatSync
endif
if executable('go-langserver')
au User lsp_setup call lsp#register_server({
\ 'name': 'go-langserver',
\ 'cmd': {server_info->['go-langserver', '-gocodecompletion']},
\ 'whitelist': ['go'],
\ })
autocmd BufWritePre *.go LspDocumentFormatSync
endif