Bingo is a Go language server that speaks Language Server Protocol.
Branch: master
Clone or download
Latest commit eedde9a Feb 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
langserver fix view update bugs Feb 22, 2019
.gitignore
LICENSE update license Sep 24, 2018
NOTICE support textDocument/implementation (Go interface impls queries) (#252) Mar 27, 2018
README.md update install guide Feb 16, 2019
go.mod fix #102 Bingo suddenly breaks with formatting in VS Code Feb 17, 2019
go.sum fix #102 Bingo suddenly breaks with formatting in VS Code Feb 17, 2019
main.go remove golist-duration flag Feb 16, 2019

README.md

bingo

bingo is a Go language server that speaks Language Server Protocol.

This project was largely inspired by go-langserver.

Supported Features

Feature

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

Install

Install

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/

Configuration

bingo's flag

--trace

print all requests and responses

--logfile <path>

log both stdout and stderr to a file

--format-style <style>

which format style is used to format documents. Supported: gofmt and goimports

--diagnostics-style <style>

which diagnostics style is used to diagnostics current document. Supported: none, instant, onsave.

--cache-style <style>

set global cache style: none, on-demand, always.

Language Client

vscode-go

{
    "go.useLanguageServer": true,
    "go.alternateTools": {
        "go-langserver": "bingo"
    },
    "go.languageServerFlags": [
        "-enhance-signature-help",
        "-trace",
        "-format-style=goimports",
    ],
    "go.languageServerExperimentalFeatures": {
        "format": true,
        "autoComplete": true
    }
}

coc.nvim

Please reference Language server

LanguageClient-neovim

let g:LanguageClient_rootMarkers = {
        \ 'go': ['.git', 'go.mod'],
        \ }

let g:LanguageClient_serverCommands = {
    \ 'go': ['bingo'],
    \ }

F.A.Q

Differences between go-langserver, bingo, golsp

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.