Language Server Protocol implementation for Go?

1,358 views
Skip to first unread message

mala...@gmail.com

unread,
Sep 4, 2017, 6:56:47 PM9/4/17
to golang-dev
Hello!

I was wondering if there was any progress or plans to make an "official" language server for Go, based on the LSP (https://github.com/Microsoft/language-server-protocol).
I saw a mention of this in the Go blog (https://blog.golang.org/contributors-summit) but I could not find any more discussion or information about this.
There is currently a server implementation from Sourcegraph (https://github.com/sourcegraph/go-langserver) but I was wondering if the Go project was looking into making one upstream, similarly to how Clang has Clangd for C/C++.

Thanks a lot!
Marc-André Laperle

Sameer Ajmani

unread,
Sep 4, 2017, 7:26:02 PM9/4/17
to Rebecca Stambler, golang-dev, mala...@gmail.com
+Rebecca has been looking at LSP for Go

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mala...@gmail.com

unread,
Sep 14, 2017, 9:07:49 AM9/14/17
to golang-dev
Rebecca, any comments on this subject? :)

Nathan Youngman

unread,
Nov 17, 2017, 2:35:55 AM11/17/17
to golang-dev

It would be really nice to see languages and editors converge on a standard like this, allowing for more code reuse. If editor plugins got skinny and most of the work was in a language server, in theory that would mean more reliable/consistent Go support across a larger choice of editors. I might be dreaming, but it does sound nice.

https://github.com/Microsoft/vscode-go#go-language-server-experimental

jan.ko...@typefox.io

unread,
Nov 24, 2017, 11:37:30 AM11/24/17
to golang-dev
We are currently working on a Go language server based on Microsoft's VSCode Go extension. It seems to be more feature rich than the LSP from Sourcegraph. In particular it has code completion. Apart from that it uses the standard go tools under the hood which gives us confidence about maintainability.

Our current approach is to wrap the VSCode Go extension into a language server by adapting/mocking VSCode APIs. That may sound hacky, but it allows us to rebase on incoming changes from the VSCode extension repo easily. It also shows where we have to bridge the pretty similar APIs and what parts can be reused as they are. Based on that it should be easy to get rid of the VSCode specific code at a later stage, when we feel confident that we support everything we need.

Sameer Ajmani

unread,
Nov 24, 2017, 8:19:56 PM11/24/17
to mala...@gmail.com, golang-dev, rsta...@google.com
+Rebecca again (alternate address)

Rebecca Stambler

unread,
Nov 28, 2017, 12:25:34 AM11/28/17
to Sameer Ajmani, mala...@gmail.com, golang-dev
So sorry I missed this email!

At this time, we don't have a plan to make an official language server for Go, but we are definitely considering it. The closest thing that Go has to Clangd right now is guru (golang.org/x/tools/cmd/guru), but it isn't a stateful server and it's missing many features. For now, the Sourcegraph LSP implementation is the best option.

Thanks!

Rebecca

+Rebecca again (alternate address)

To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages