From 1686de008d479a0eb8aa9a7e94c15548bd8ee122 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Sun, 21 Jul 2024 20:27:34 +1200 Subject: [PATCH] emacs: add corfu --- .emacs.d/init.el | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 125b602..21cdf22 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -180,19 +180,14 @@ value `italic'." (marginalia-mode) (vertico-mode) -;; company completion -(package-install 'company) -(require 'company) -(add-hook 'after-init-hook 'global-company-mode) -(add-to-list 'hidden-minor-modes 'company-mode) -(setq company-begin-commands '(self-insert-command) - company-idle-delay .1 - company-minimum-prefix-length 2 - company-show-numbers t - company-tooltip-align-annotations 't - read-buffer-completion-ignore-case t - read-file-name-completion-ignore-case t - completion-ignore-case t) +;; completion with corfu +(package-install 'corfu) +(require 'corfu) +(setq corfu-auto t + corfu-cycle t + corfu-preselect 'prompt + corfu-quit-no-match t) +(add-hook 'prog-mode-hook #'corfu-mode) ;; eglot (require 'eglot)