feat(corfu, vertico): use equal orderless config
This removes the old `&` separator for Vertico (does anyone use that instead of just space?) in favor of escapable space and unifies orderless config with Corfu. Also implements smart separator insert/escape/reset on `C-SPC` Co-authored-by: Liam Hupfer <liam@hpfr.net>
This commit is contained in:
parent
62b2cf9cbf
commit
db34c67d20
4 changed files with 54 additions and 35 deletions
|
@ -57,26 +57,27 @@
|
|||
(when (modulep! +icons)
|
||||
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
|
||||
|
||||
(map! :map corfu-map
|
||||
[return] #'corfu-insert
|
||||
"RET" #'corfu-insert)
|
||||
(when (modulep! +orderless)
|
||||
(let ((cmds-del (cmds! (and (modulep! +tng)
|
||||
(> corfu--index -1)
|
||||
(eq corfu-preview-current 'insert))
|
||||
#'corfu-reset)))
|
||||
(map! :map corfu-map
|
||||
"C-SPC" #'corfu-insert-separator))
|
||||
(when (modulep! +tng)
|
||||
(map! :map corfu-map
|
||||
[tab] #'corfu-next
|
||||
[backtab] #'corfu-previous
|
||||
"TAB" #'corfu-next
|
||||
"S-TAB" #'corfu-previous)
|
||||
(let ((cmds-del (cmds! (and (modulep! +tng)
|
||||
(> corfu--index -1)
|
||||
(eq corfu-preview-current 'insert))
|
||||
#'corfu-reset)))
|
||||
(map! :map corfu-map
|
||||
[return] #'corfu-insert
|
||||
"RET" #'corfu-insert
|
||||
(:when (modulep! +orderless)
|
||||
"<remap> <completion-at-point>" #'+corfu-smart-sep-toggle-escape)
|
||||
(:when (modulep! +tng)
|
||||
[tab] #'corfu-next
|
||||
[backtab] #'corfu-previous
|
||||
"TAB" #'corfu-next
|
||||
"S-TAB" #'corfu-previous
|
||||
[backspace] cmds-del
|
||||
"DEL" cmds-del)))
|
||||
|
||||
(when (modulep! +orderless)
|
||||
(after! orderless
|
||||
(setq orderless-component-separator #'orderless-escapable-split-on-space)))
|
||||
|
||||
(after! vertico
|
||||
(map! :map corfu-map
|
||||
"M-m" #'+corfu-move-to-minibuffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue