Skip to content
This repository has been archived by the owner on Aug 21, 2022. It is now read-only.

Latest commit

 

History

History
124 lines (84 loc) · 3 KB

README_old.md

File metadata and controls

124 lines (84 loc) · 3 KB

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

git clone -b bingo https://github.com/saibing/tools.git
cd tools/cmd/gopls
go install

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

{
    "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'],
    \ }

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.