emacs: Use corfu for autocomplete instead of company

This commit is contained in:
Charlotte Van Petegem 2023-08-01 13:34:57 +02:00
parent ea324ae68a
commit cee06c6d42
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -102,20 +102,20 @@
) )
;; Autocomplete ;; Autocomplete
(use-package company (use-package corfu
:diminish (company-mode) :diminish (corfu-mode)
:hook ((text-mode prog-mode) . company-mode)
:custom :custom
(company-backends '((company-capf company-yasnippet) (company-dabbrev-code company-keywords) company-dabbrev)) (corfu-cycle t "Enable cycling through completions")
(company-dabbrev-downcase nil "Don't downcase completions") (corfu-auto t "Auto completion")
(company-dabbrev-ignore-case t "Change full casing of completion if completion has different case") (corfu-auto-prefix 2 "Show completion after two characters")
(company-minimum-prefix-length 2 "Start autocompletion after 2 characters") :config
(global-corfu-mode)
) )
;; Prescient in company ;; Prescient in company
(use-package company-prescient (use-package corfu-prescient
:after (company prescient) :after (corfu prescient)
:config (company-prescient-mode 1) :config (corfu-prescient-mode 1)
) )
;; Replacements for emacs built-ins that better integrate with `vertico'. ;; Replacements for emacs built-ins that better integrate with `vertico'.