mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
tools/lsp: fix company-lsp not being enabled
Due to a load-order issue between company and lsp.
This commit is contained in:
@ -48,10 +48,15 @@
|
||||
|
||||
(def-package! company-lsp
|
||||
:when (featurep! :completion company)
|
||||
:after lsp-mode
|
||||
:config
|
||||
:defer t
|
||||
:init
|
||||
;; Make sure that `company-capf' is disabled since it is incompatible with
|
||||
;; `company-lsp' (see lsp-mode#884)
|
||||
(setq-hook! 'lsp-mode-hook company-backends
|
||||
(cons 'company-lsp
|
||||
(remq 'company-capf company-backends))))
|
||||
(defun +lsp|init-company ()
|
||||
(if (not (bound-and-true-p company-mode))
|
||||
(add-hook 'company-mode-hook #'+lsp|init-company t t)
|
||||
(setq-local company-backends
|
||||
(cons 'company-lsp
|
||||
(remq 'company-capf company-backends)))
|
||||
(remove-hook 'company-mode-hook #'+lsp|init-company t)))
|
||||
(add-hook 'lsp-mode-hook #'+lsp|init-company))
|
||||
|
Reference in New Issue
Block a user