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
365a95de76
commit
0588b42b46
5 changed files with 31 additions and 2 deletions
|
@ -8,3 +8,15 @@
|
|||
(let ((completion-extra-properties corfu--extra)
|
||||
(completion-cycle-threshold completion-cycling))
|
||||
(apply #'consult-completion-in-region completion-in-region--data)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +corfu-smart-sep-toggle-escape ()
|
||||
"Insert `corfu-separator' or toggle escape if it's already there."
|
||||
(interactive)
|
||||
(cond ((and (char-equal (char-before) corfu-separator)
|
||||
(char-equal (char-before (1- (point))) ?\\))
|
||||
(save-excursion (delete-char -2)))
|
||||
((char-equal (char-before) corfu-separator)
|
||||
(save-excursion (backward-char 1)
|
||||
(insert-char ?\\)))
|
||||
(t (call-interactively #'corfu-insert-separator))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue