Tweak corfu/cape to activate after 2 characters

Makes it all feel a bit more snappy
This commit is contained in:
Evie Litherland-Smith 2024-02-17 09:32:41 +00:00
parent e882bc04b0
commit 64f04fb255

View file

@ -259,7 +259,7 @@ Set treesit to fontify all elements, default was 3 (out of 4)
(corfu-cycle t)
(corfu-auto t)
(corfu-auto-delay 0.2)
(corfu-auto-prefix 3)
(corfu-auto-prefix 2)
(corfu-quit-no-match 'separator)
(corfu-quit-at-boundary 'separator)
(corfu-preview-current nil)
@ -294,6 +294,8 @@ Set treesit to fontify all elements, default was 3 (out of 4)
(with-eval-after-load 'shell (add-hook 'shell-mode-hook 'my/local-corfu-no-auto))
(with-eval-after-load 'gud (add-hook 'gud-mode-hook 'my/local-corfu-no-auto)))
(require 'corfu)
(use-package cape
:ensure t
:diminish
@ -301,7 +303,11 @@ Set treesit to fontify all elements, default was 3 (out of 4)
:init
(add-to-list 'completion-at-point-functions #'cape-emoji)
(add-to-list 'completion-at-point-functions #'cape-file)
(add-to-list 'completion-at-point-functions #'cape-dabbrev))
(add-to-list 'completion-at-point-functions #'cape-dabbrev)
:custom
(cape-dabbrev-min-length (+ corfu-auto-prefix 1)))
(require 'cape)
#+end_src
** Consult