Set `company-backends' to a restrictive set of backends

This commit is contained in:
Gerard Vermeulen 2024-06-24 09:29:59 +02:00
parent ce78da22a1
commit b0873bc9b6

View File

@ -1382,6 +1382,12 @@ sets it up after ensuring its installation.
#+name: lst:setup-company
#+begin_src emacs-lisp -n :results silent
(when (ensure-package-installation 'company)
(with-eval-after-load 'company
;; GAV: Set `company-backends' more restrictively than `company'.
(setopt company-backends
'(company-capf company-files
(company-dabbrev-code company-keywords)
company-dabbrev)))
;; GAV: `desktop' may enable `company-mode' for files it remembers.
(add-hook 'emacs-lisp-mode-hook #'company-mode)
(add-hook 'lisp-interaction-mode-hook #'company-mode)