bingo is a Go language server that speaks Language Server Protocol.
This project was largely inspired by go-langserver.
bingo will support editor features as follow:
- textDocument/hover
- textDocument/definition
- textDocument/xdefinition
- textDocument/typeDefinition
- textDocument/references
- textDocument/implementation
- textDocument/formatting
- textDocument/rangeFormatting
- textDocument/documentSymbol
- textDocument/completion
- textDocument/signatureHelp
- textDocument/publishDiagnostics
- textDocument/rename
- textDocument/codeAction
- textDocument/codeLens
- workspace/symbol
- workspace/xreferences
bingo is a go module project, so you need install Go 1.11 or above,
to install the bingo
, please run
git clone -b bingo https://github.com/saibing/tools.git
cd tools/cmd/gopls
go install
print all requests and responses
log both stdout and stderr to a file
which format style is used to format documents. Supported: gofmt and goimports
which diagnostics style is used to diagnostics current document. Supported: none, instant, onsave.
set global cache style: none, on-demand, always.
{
"go.useLanguageServer": true,
"go.alternateTools": {
"go-langserver": "bingo"
},
"go.languageServerFlags": [
"-enhance-signature-help",
"-trace",
"-format-style=goimports",
],
"go.languageServerExperimentalFeatures": {
"format": true,
"autoComplete": true
}
}
Please reference Language server
let g:LanguageClient_rootMarkers = {
\ 'go': ['.git', 'go.mod'],
\ }
let g:LanguageClient_serverCommands = {
\ 'go': ['bingo'],
\ }
go-langserver is designed for online code reading such as github.com.
bingo is designed for offline editors such as vscode, vim, it focuses on code editing.
gopls is an official language server, and it is currently in early development.