Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

go-langserver + gocode integration #63

Closed
anjmao opened this issue Sep 20, 2018 · 7 comments
Closed

go-langserver + gocode integration #63

anjmao opened this issue Sep 20, 2018 · 7 comments

Comments

@anjmao
Copy link

anjmao commented Sep 20, 2018

Hi, recently I updated go-langserver to use gocode suggest API. go-langserver is directly using internal/suggest api since it doesn't need to run daemon with server-client.

Here are few problems I see.

  1. Current repository contains integrations for vim, neovim, sublime etc. which are not needed for go-langserver.
  2. It contains server-client daemon which is not needed for go-langserver.
  3. Since I want to help improve gocode and go-langserver currently I will need to make PR in this repo and then copy-paste code to go-langserver. It's time consuming.

My suggestions:

  1. Move internal/suggest to public pkg/suggest.
  2. Make it go-gettable go get github.com/mdempsky/gocode/pkg/suggest.
  3. Vendor this new package in go-langserver.

@mdempsky
I could make PR for this change.

@alindeman
Copy link

@anjmao Sounds worthwhile of a PR to me.

@anjmao
Copy link
Author

anjmao commented Oct 5, 2018

I'm a bit confused about gocode.

  1. Originally it was started in https://github.com/nsf/gocode
  2. Later https://github.com/mdempsky/gocode forked in and added support for go 1.10 and made rewrite to be more idiomatic go.
  3. Now as go 1.11 is out, module support is added to https://github.com/stamblerre/gocode and this fork is also used in vscode.
  4. It looks that both @mdempsky and @stamblerre are working in Google.

As autocompletion is one of the most useful features (at least for me) would't it make sense to move gocode to some organisation so we have official place for development instead of having fork of fork of fork? Currently I even don't know to which repo should I contribute if I want to fix something.

@myitcv
Copy link

myitcv commented Oct 5, 2018

@anjmao please see #46 (comment)

@stamblerre
Copy link
Collaborator

As @myitcv mentioned, the Go team is currently working on a language server that will replace gocode. I will maintain mdempsky/gocode for now, but I don't think we will be making any major changes, and we don't want to expose any APIs that others may depend on.

I'm not sure how go-langserver stays consistent with the internal/suggest API, but at this point, I would say that if you want to make a contribution to both repositories, you will have to make 2 PRs. I'm sorry about the state of things--it will be improved soon!

@imjustfly
Copy link

@stamblerre Very glad to hear that an official language server is in progress. When will the early beta version be released? I'm looking forward to it!

@stamblerre
Copy link
Collaborator

@imjustfly we don't have any specific dates set yet, but we will definitely publicize it when there is a beta version.

@saibing
Copy link

saibing commented Nov 25, 2018

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

6 participants