Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion for Go layer is broken for imported packages with latest version #13863

Closed
p554157atch opened this issue Aug 20, 2020 · 5 comments
Assignees

Comments

@p554157atch
Copy link

With latest version of Golang Gomodules becomes the default thing! sigh.
And GOCODE and many other outdated tools won't support this stuff.

The company-go package wast last updated 4 years ago:
https://github.com/emacsmirror/company-go/blob/master/company-go.el

It does not support:
https://github.com/golang/tools/blob/master/gopls/doc/user.md

Spacemacs should move to gopls or something better and remove support for old code that calls gocode that no longer works with any kind of imports.

See this issue:
nsf/gocode#537

@p554157atch
Copy link
Author

GOCODE IS not maintained anymore:
https://develop.spacemacs.org/layers/+lang/go/README.html

Move to GOPLS or something better,
Remove GOCODE from documentation.

@smile13241324 smile13241324 self-assigned this Aug 26, 2020
@smile13241324
Copy link
Collaborator

@p554157atch there is no moving to gopls as spacemacs already has full LSP support aka also support for latest gopls. The reason why LSP is not the default for most layers is that it requires a separate setup step which not all users are willing to go through.

If the alternative backend is not longer maintained we will shift the default to LSP like we did with the scala layer.
If you want to speed things up please have a look at the other tools loaded in that layer and point out which of these are obsolete nowadays and I can adapt it.

Remember this is a communities project, there is no way we (maintainers) can keep track of outdated packages in the individual layers, this must be fixed or at least reported by people using this language.

@smile13241324
Copy link
Collaborator

I have started changing the layer to be favouring gopls over go-mode by default. However I am unsure how much of the given tools are actually needed when LSP is activated.

Can someone more familiar with go have a look and post a list of packages which are not longer working in this layer?
Till I have some more information I will remove company-go but keep the rest of the packages.

@smile13241324
Copy link
Collaborator

I am through, the layer documentation now clearly explains which backends are available and deprecates go-mode. The layer uses the standard way to select a backend, this is if lsp-layer is loaded gopls is used if not found go-mode is used otherwise.

I am closing this ticket for now. If more packages are found which must be replaced in that layer this issue should be reopened.

@p554157atch
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants