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

[go] Disable use of company-go when gopls is used #16392

Merged
merged 1 commit into from
May 20, 2024

Conversation

rawenous
Copy link
Contributor

@rawenous rawenous commented May 9, 2024

The default backend for go-layer is lsp but company-go was still added to company-backends forcing it to search for gocode which should not be used since the user wants lsp.

This change only adds company-go to company-backends if go-mode is selected as the backend.

Note: go-mode is deprecated and gocode is not maintained anymore

@rawenous
Copy link
Contributor Author

rawenous commented May 9, 2024

This may not be the optimal way of solving this so please let me know if there is a more correct emacs/spacemacs way.

This seems to solve #11217 and adds the last cleanup needed for #13863

Copy link
Collaborator

@smile13241324 smile13241324 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should rather put a condition on the company go package itself so that it is not installed at all, right now we are installing it but never use it.

A good example for this is the package flycheck-golangci-lint.

@rawenous
Copy link
Contributor Author

Thanks. I will take a look at it.

The default backend for go-layer is lsp but company-go was still
added to company-backends forcing it to search for gocode which should
not be used since the user wants lsp.

This change only adds company-go to company-backends if go-mode is
selected as the backend.

Note: go-mode is deprecated and gocode is not maintained anymore
@smile13241324 smile13241324 merged commit a4f2067 into syl20bnr:develop May 20, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants