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`
This commit is contained in:
parent
3d41c07370
commit
fc15f169da
2 changed files with 27 additions and 66 deletions
|
@ -98,6 +98,7 @@ orderless."
|
|||
;; Flex matching
|
||||
((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))
|
||||
((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))
|
||||
;; TODO: Find a way to deduplicate this code from the corfu module.
|
||||
(add-to-list
|
||||
'completion-styles-alist
|
||||
'(+vertico-basic-remote
|
||||
|
@ -110,7 +111,7 @@ orderless."
|
|||
;; find-file etc.
|
||||
completion-category-overrides '((file (styles +vertico-basic-remote orderless partial-completion)))
|
||||
orderless-style-dispatchers '(+vertico-orderless-dispatch)
|
||||
orderless-component-separator "[ &]")
|
||||
orderless-component-separator #'orderless-escapable-split-on-space)
|
||||
;; ...otherwise find-file gets different highlighting than other commands
|
||||
(set-face-attribute 'completions-first-difference nil :inherit nil))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue