Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

switch the default language server to bingo or golsp #2253

Closed
OneOfOne opened this issue Jan 16, 2019 · 19 comments
Closed

switch the default language server to bingo or golsp #2253

OneOfOne opened this issue Jan 16, 2019 · 19 comments

Comments

@OneOfOne
Copy link
Contributor

From https://github.com/sourcegraph/go-langserver:

Note: We have deprioritized work on this language server for use in editors in favor of Google's upcoming Go language server. It is in the best interests of the community to only have a single language server. If you want to use a Go language server with your editor in the meantime, try https://github.com/saibing/bingo, which is a partial fork of this repository with fixes for Go modules and other editor bugs.

Bingo is actively maintained and the works the best out of the 3 available options that I personally tried, the 3rd being golsp is getting there but it's still lacking behind partly because it's maintained in the official go tree and it takes longer time and reviews to improve it.

@webframp
Copy link

I've also had good results bingo instead of go-langserver. Perhaps just a user setting could be added to allow overriding the binary used?

@OneOfOne
Copy link
Contributor Author

@webframp you can do that already:

	"go.useLanguageServer": true,
	"go.alternateTools": {
		"go-langserver": "bingo"
	},
	"go.languageServerFlags": ["-format-style=goimports"],

But making it the default would provide a better experience to new comers.

@inliquid
Copy link

+1 for bingo as default language server
For configuration with VS Code I suggest following this page:

    "go.useLanguageServer": true,

    "go.alternateTools": {
        "go-langserver": "bingo"
    },

    "go.languageServerFlags": ["--format-style", "goimports"],

    "go.languageServerExperimentalFeatures": {
        "format": true,
        "autoComplete": true
    }

@webframp
Copy link

Great info thanks @inliquid and @OneOfOne

@OneOfOne
Copy link
Contributor Author

They added support for autocomplete unimported packages, woohoo.

@lggomezml
Copy link

lggomezml commented Feb 8, 2019

After a couple of days of using it at work I can't say I feel inclined to use bingo as the default. It is way more responsive than the sourcegraph server but it also has some annoying bugs that result in false errors like this one:

screen shot 2019-02-08 at 14 50 15

It seems that golsp (now renamed to gopls) still isn't ready, but it can be tested via a local extension setup: https://github.com/golang/tools/tree/master/cmd/gopls/integration/vscode

@inliquid
Copy link

inliquid commented Feb 8, 2019

@lggomezml if you see some bug, please report it at bingo's repo. It's under active development, and maintainer is also very active, closing all major issues literally in hours. Not sure what you mean btw, I have not seen any big problems with it so far, and it's the only language server that works normally with GO111MODULE=on, finds interface implementations (and doesn't spend hours on this) and the only server that works on Windows.

@nezorflame
Copy link
Contributor

+1 for bingo since gopls is still in its infancy.

@bcomnes
Copy link

bcomnes commented Mar 8, 2019

It seems that golsp (now renamed to gopls) still isn't ready, but it can be tested via a local extension setup: https://github.com/golang/tools/tree/master/cmd/gopls/integration/vscode

Frustrating I have to float a development package to test that out. They should make it work like bingo!

@broady
Copy link
Contributor

broady commented Mar 20, 2019

@bcomnes I got that working, per docs on the wiki: https://github.com/Microsoft/vscode-go/wiki/Go-modules-support-in-Visual-Studio-Code#can-i-use-the-language-server-when-using-go-modules

  "go.alternateTools": {
    "go-langserver": "gopls", // or bingo
  },
  "go.languageServerExperimentalFeatures": {
    "format": true,
    "autoComplete": true
  },
  "go.useLanguageServer": true

and it works really well.
though I lost syntax highlighting. any idea how to get that back?
edit: looks like a restart got highlighting back

@bcomnes
Copy link

bcomnes commented Mar 20, 2019

Interesting, I'll try it out.

@tonywenoracle
Copy link

I tried bingo. It's awesome. It first loading is slower compare to sourcegraph/go-lanserver. But, when it's done, "Find All Reference" can be done in a flash. Amazing!

@broady
Copy link
Contributor

broady commented Mar 27, 2019 via email

@nezorflame
Copy link
Contributor

nezorflame commented Mar 27, 2019

gopls is still in eary stages, bingo is more complete and feature-rich right now.

Here's my current setup:

"go.useLanguageServer": true,
"go.alternateTools": {
    "go-langserver": "bingo"
},
"go.languageServerFlags": [
    "--diagnostics-style=instant",
    "--enhance-signature-help",
    "--format-style=goimports",
    "--goimports-prefix='github.com/nezorflame'", // enter your own here
],
"go.languageServerExperimentalFeatures": {
    "autoComplete": true,
    "documentSymbols": true,
    "findReferences": true,
    "format": true,
    "goToDefinition": true,
    "goToTypeDefinition": true,
    "hover": true,
    "signatureHelp": true,
    "rename": true,
    "workspaceSymbols": true,
}

@inliquid
Copy link

inliquid commented Mar 27, 2019

I tried. Configured as they recommend, compiled... On my Windows machine it simply didn't work. Runs, but nothing... Deleted. To the moment gopls will be at least functional, Bingo will do a lot more.

@tonywenoracle
Copy link

@broady Sorry, I haven't yet. I'll post the result when I try it.

@inliquid
Copy link

inliquid commented Mar 28, 2019

@thegtproject I never had any problems with installing/running Bingo on Windows, my previous comment was regarding gopls (the "official" LSP server)

As for installing Bingo on Windows it's quite simple, and same as with other OSes, actually

  1. git clone https://github.com/saibing/bingo.git (if you want to keep track of updates locally)
  2. cd bingo
  3. go install

@xlucas
Copy link

xlucas commented May 7, 2019

Is there a way to disable the language server warning from this extension? It's super annoying and in my experience gopls/bingo simply don't work as well right now with projects not using go modules. This would be better if we could turn that off until there's a more mature alternative.

@ramya-rao-a
Copy link
Contributor

Closing this issue as gopls is now the default language server choice. One can still choose to use bingo in its place. Details are in the language server section in the README

@xlucas AFAIK the warnings/notification for the language server does have the option of "Don't show again". If it doesn't show up or doesn't work, please log a new issue

@microsoft microsoft locked as resolved and limited conversation to collaborators Jul 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants