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 https://github.com/saibing/bingo.git
cd bingo
GO111MODULE=on go install
If you live in China and may not be able to download golang.org/x/ dependency module, please set GOPROXY as follow:
export GOPROXY=https://athens.azurefd.net/
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.