syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.56k stars 4.9k forks source link

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

Closed rawenous closed 1 month ago

rawenous commented 1 month ago

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 commented 1 month ago

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

rawenous commented 1 month ago

Thanks. I will take a look at it.