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
|
(defvar +corfu-buffer-scanning-size-limit (* 1 1024 1024) ; 1 MB
|
||||||
"Size limit for a buffer to be scanned by `cape-dabbrev'.")
|
"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
|
;;; Packages
|
||||||
(use-package! corfu
|
(use-package! corfu
|
||||||
|
|
|
@ -163,14 +163,15 @@
|
||||||
(:after corfu
|
(:after corfu
|
||||||
(:map corfu-mode-map
|
(:map corfu-mode-map
|
||||||
:e "C-M-i" #'completion-at-point
|
:e "C-M-i" #'completion-at-point
|
||||||
(:prefix "C-x"
|
(:when +corfu-want-C-x-bindings
|
||||||
:i "C-l" #'cape-line
|
(:prefix "C-x"
|
||||||
:i "C-k" #'cape-keyword
|
:i "C-l" #'cape-line
|
||||||
:i "C-f" #'cape-file
|
:i "C-k" #'cape-keyword
|
||||||
:i "s" #'cape-dict
|
:i "C-f" #'cape-file
|
||||||
:i "C-s" #'yasnippet-capf
|
:i "s" #'cape-dict
|
||||||
:i "C-n" #'cape-dabbrev
|
:i "C-s" #'yasnippet-capf
|
||||||
:i "C-p" #'cape-history)
|
:i "C-n" #'cape-dabbrev
|
||||||
|
:i "C-p" #'cape-history))
|
||||||
(:unless (modulep! :completion corfu +tng)
|
(:unless (modulep! :completion corfu +tng)
|
||||||
:i "C-SPC" #'completion-at-point
|
:i "C-SPC" #'completion-at-point
|
||||||
:n "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
:n "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue