Open robbyoconnor opened 6 years ago
Also worth referencing: https://github.com/mdempsky/gocode/issues/46
I currently have a simple solution
then it works for me now.
https://github.com/sourcegraph/go-langserver/pull/305 should ultimately fix the PANIC
issue once merged I think
Hi, I could work on gocode autocomplete support for go 1.11.
golang.org/x/tools/go/packages
needs to be added@keegancsmith It looks that this change will potentially break go 1.9-1.10 support, which is something I don't like, but I will see how it goes.
The implementation depends on the Go 1.11 go command; support for earlier versions will be added soon.
Before working on this issue we should probably implement https://github.com/sourcegraph/go-langserver/issues/320.
not only the code completion, also, find references doesn't work when project is out of gopath.
Tried to dig into this issue, but language server's implementation is too complicated.
I think I find the solution for finding references. Working on it.
But in my own opinion, the best direction is rewriting the project with golang.org/x/tools/go/packages
, which needs lots of works and is not compatible with older versions of go.
So I concern what's the plan for it ? @keegancsmith
There is a new fork of gocode which works for modules https://github.com/stamblerre/gocode
vscode-go is starting to use it, and it's shown in golang issue trackers for tools supporting modules: https://github.com/golang/go/issues/24661
Note: The go tools team at Google is working on a language server which will support go/packages from the get go. Here is some more information on that https://go-review.googlesource.com/c/tools/+/136676#message-11c783bc9a9f6adf6119bbb85c89510fda25abe9
Unless someone from the community does this for go-langserver, I suspect the server from google will be ready before we have time to work on this.
@robbyoconnor @keegancsmith @dzhou121
bingo is a new go language server that support go 1.11 modules
please try it.
Note: The go tools team at Google is working on a language server which will support go/packages from the get go. Here is some more information on that https://go-review.googlesource.com/c/tools/+/136676#message-11c783bc9a9f6adf6119bbb85c89510fda25abe9
Unless someone from the community does this for go-langserver, I suspect the server from google will be ready before we have time to work on this.
Thanks for sharing the link.
So, how does one use the new cmd/golsp
?
If you are using vscode check out https://github.com/golang/tools/tree/master/cmd/gopls/integration/vscode
@keegancsmith Thanks a lot.
I was able to get it working with golsp
but I've found bingo
to be more stable and faster so I am using bingo
. I didn't have to install the extension that you linked to (https://github.com/golang/tools/tree/master/cmd/gopls/integration/vscode). vscode-go
worked fine.
I've written a post about setting up the two: https://bana.io/blog/go-language-server/. I've happy to modify the contents of the blog post if you spot issues or have better ideas.
https://github.com/golang/tools/tree/master/cmd/gopls really needs a detailed README.md
explaining how to get started and how to contribute. I've spotted a new panic
s that I know I can fix but looking at repo and it lack of documentation makes me think it's not getting much love, I could be wrong.
gopls is under active development by google's go tools team. What I linked to is likely early days, although I believe it is getting close to some sort of announcement. bingo is a good alternative until then.
Tried golsp
along with its vscode
extension. It gave me The gopls server crashed 5 times in the last 3 minutes. The server will not be restarted.
error and couldn't figure out why.
@saibing your bingo
works nicely. Thanks for the great work!
golsp worked for me fine...
On 2/27/19 9:35 PM, Guan Gui wrote:
Tried |golsp| along with its |vscode| extension. It gave me |The gopls server crashed 5 times in the last 3 minutes. The server will not be restarted.| error and couldn't figure out why.
@saibing https://github.com/saibing your |bingo| works nicely. Thanks for the great work!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sourcegraph/go-langserver/issues/316#issuecomment-468113019, or mute the thread https://github.com/notifications/unsubscribe-auth/AABaMFqFMASNmHRDK4C8mExv7xtZebVTks5vR0BUgaJpZM4WXCQr.
Things need to be updated to support go 1.11, currently, things don't work correctly in go 1.11.