-
Notifications
You must be signed in to change notification settings - Fork 307
Servers Go
Prabir Shrestha edited this page May 9, 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
go get -u github.com/saibing/bingo
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
if executable('bingo')
au User lsp_setup call lsp#register_server({
\ 'name': 'bingo',
\ 'cmd': {server_info->['bingo', '-mode', 'stdio']},
\ 'whitelist': ['go'],
\ })
endif