feat(config): make C-x corfu bindings optional
For someone like me that uses the vanilla emacs commands bound to C-x C-p, C-x C-n, etc, I prefer to set the completion keybindings manually.
This commit is contained in:
parent
3b275b271a
commit
39b0de8736
2 changed files with 12 additions and 8 deletions
|
@ -3,6 +3,9 @@
|
|||
(defvar +corfu-buffer-scanning-size-limit (* 1 1024 1024) ; 1 MB
|
||||
"Size limit for a buffer to be scanned by `cape-dabbrev'.")
|
||||
|
||||
(defvar +corfu-want-C-x-bindings t
|
||||
"Whether `C-x' is a completion prefix in Evil insert state.")
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
(use-package! corfu
|
||||
|
|
|
@ -163,6 +163,7 @@
|
|||
(:after corfu
|
||||
(:map corfu-mode-map
|
||||
:e "C-M-i" #'completion-at-point
|
||||
(:when +corfu-want-C-x-bindings
|
||||
(:prefix "C-x"
|
||||
:i "C-l" #'cape-line
|
||||
:i "C-k" #'cape-keyword
|
||||
|
@ -170,7 +171,7 @@
|
|||
:i "s" #'cape-dict
|
||||
:i "C-s" #'yasnippet-capf
|
||||
:i "C-n" #'cape-dabbrev
|
||||
:i "C-p" #'cape-history)
|
||||
:i "C-p" #'cape-history))
|
||||
(:unless (modulep! :completion corfu +tng)
|
||||
:i "C-SPC" #'completion-at-point
|
||||
:n "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue