Skip to content
Bingo is a Go language server that speaks Language Server Protocol.
Go Makefile
Branch: master
Clone or download
Pull request Compare This branch is 9 commits behind saibing:master.
saibing Merge pull request saibing#170 from banaio/format_anonymous_struct_is…
…sue_143

Format anonymous struct issue 143
Latest commit af7e319 Mar 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
langserver hover: add case for `*types.PkgName` Mar 26, 2019
.gitignore add go.sum file Dec 2, 2018
.golangci.yml Add golangci-lint (https://github.com/golangci/golangci-lint) linter: Mar 14, 2019
LICENSE update license Sep 24, 2018
Makefile Add golangci-lint (https://github.com/golangci/golangci-lint) linter: Mar 14, 2019
NOTICE support textDocument/implementation (Go interface impls queries) (#252) Mar 27, 2018
README.md update bingo install guide Feb 28, 2019
go.mod update thirdparty go module's version Mar 23, 2019
go.sum
main.go fix saibing#163 Add format-tool Flag Mar 24, 2019

README.md

bingo

Go Report Card

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

go get -u github.com/saibing/bingo

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.

You can’t perform that action at this time.