Re-introduce +lsp-company-backends
Not a perfect solution, but it'll do while I figure out a better solution for set-company-backends!'s inflexibility.
This commit is contained in:
parent
318b3ef238
commit
e852ac0469
1 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,13 @@
|
|||
;;; tools/lsp/+lsp.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +lsp-company-backends 'company-capf
|
||||
"The backends to prepend to `company-backends' in `lsp-mode' buffers.
|
||||
Can be a list of backends; accepts any value `company-backends' accepts.")
|
||||
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! lsp-mode
|
||||
:commands lsp-install-server
|
||||
:init
|
||||
|
@ -104,8 +112,9 @@ This also logs the resolved project root, if found, so we know where we are."
|
|||
(add-hook 'company-mode-hook #'+lsp-init-company-h t t)
|
||||
;; Ensure `company-capf' is at the front of `company-backends'
|
||||
(setq-local company-backends
|
||||
(cons 'company-capf
|
||||
(remq 'company-capf company-backends)))
|
||||
(cons +lsp-company-backends
|
||||
(remove +lsp-company-backends
|
||||
(remq 'company-capf company-backends))))
|
||||
(remove-hook 'company-mode-hook #'+lsp-init-company-h t)))
|
||||
(defun +lsp-init-flycheck-or-flymake-h ()
|
||||
"Set up flycheck-mode or flymake-mode, depending on `lsp-diagnostic-package'."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue