Skip to content

Commit

Permalink
[go] Disable use of company-go when gopls is used
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rawenous committed May 9, 2024
1 parent a58a7d7 commit 69036e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layers/+lang/go/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
(defun go/init-company-go ()
(use-package company-go
:defer t
:init (spacemacs|add-company-backends
:init (when (eq go-backend 'go-mode)
spacemacs|add-company-backends
:backends company-go
:modes go-mode
:variables company-go-show-annotation t)))
Expand Down

0 comments on commit 69036e0

Please sign in to comment.