feat(vertico): add char-fold style dispatcher
affixing with % uses char-fold-to-regexp on the input
This commit is contained in:
parent
26014435b2
commit
c0fd2c37cd
2 changed files with 10 additions and 6 deletions
|
@ -228,12 +228,13 @@ pressing space and entering another input. In essence, when trying to match
|
|||
|
||||
Doom has some builtin [[https://github.com/oantolin/orderless#style-dispatchers][style dispatchers]] for more finegrained filtering, which
|
||||
you can use to further specify each space separated input in the following ways:
|
||||
| Input | Description |
|
||||
|------------------+--------------------------------------------|
|
||||
| =!foo= | match without literal input =foo= |
|
||||
| =`bar= or =bar`= | match input =bar= as an initialism |
|
||||
| ==baz= or =baz== | match only with literal input =baz= |
|
||||
| =~qux= or =qux~= | match input =qux= with fuzzy/flex matching |
|
||||
| Input | Description |
|
||||
|------------------+----------------------------------------------|
|
||||
| =!foo= | match without literal input =foo= |
|
||||
| =%foo= or =foo%= | perform ~char-fold-to-regexp~ on input =foo= |
|
||||
| =`foo= or =foo`= | match input =foo= as an initialism |
|
||||
| ==foo= or =foo== | match only with literal input =foo= |
|
||||
| =~foo= or =foo~= | match input =foo= with fuzzy/flex matching |
|
||||
|
||||
* Configuration
|
||||
If you want to further configure this module, here are some good places to start:
|
||||
|
|
|
@ -41,6 +41,9 @@ overrides `completion-styles' during company completion sessions.")
|
|||
((string= "!" pattern) `(orderless-literal . ""))
|
||||
;; Without literal
|
||||
((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))
|
||||
;; Character folding
|
||||
((string-prefix-p "%" pattern) `(char-fold-to-regexp . ,(substring pattern 1)))
|
||||
((string-suffix-p "%" pattern) `(char-fold-to-regexp . ,(substring pattern 0 -1)))
|
||||
;; Initialism matching
|
||||
((string-prefix-p "`" pattern) `(orderless-initialism . ,(substring pattern 1)))
|
||||
((string-suffix-p "`" pattern) `(orderless-initialism . ,(substring pattern 0 -1)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue