diff --git a/modules/completion/selectrum/README.org b/modules/completion/selectrum/README.org index 34b809f04..6c6f2f272 100644 --- a/modules/completion/selectrum/README.org +++ b/modules/completion/selectrum/README.org @@ -147,13 +147,14 @@ A wgrep buffer can be opened from ~consult-line~ with =C-c C-e= (not yet). ** Orderless filtering When using orderless to filter through candidates, the default behaviour is for -each space separated inputs to match the candidate as a regular expression or +each space separated input to match the candidate as a regular expression or literally. -You can further specify each space separated input in the following ways: +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= or =foo!= | match without literal input =foo= | +| =!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 | diff --git a/modules/completion/selectrum/TODO.org b/modules/completion/selectrum/TODO.org index e81ba4d29..be99a1eb0 100644 --- a/modules/completion/selectrum/TODO.org +++ b/modules/completion/selectrum/TODO.org @@ -5,6 +5,10 @@ Idealy would replace =C-o= as the default binding. Current suggestion is both =:leader a= and =C-,=. Note that =C-,= is bound to ~org-cycle-agenda-files~ but so is =C-'=. ** TODO consider dropping prescient flag +The only advantage over orderless is frecency over recency, without the better +integration orderless has with built in emacs completion. A compromise might be +to have ~+prescient~ just add prescient sorting, but it's probably not worth the +maintenance burden. ** TODO =SPC s s= and =SPC s S= ~:sw~ ? There isn't really a selectrum analogue to ~swiper-isearch~, ~consult-isearch~ does something else (give you previously used isearch search terms). Bound to @@ -12,13 +16,8 @@ regular isearch for now. ** TODO =SPC s B= Selectrum/Consult don't have a ~swiper-all~ analogue either. Unbound for now. ** TODO orderless style dispatchers -currently we just copy the ones of the consult wiki (sans file extentions), but -these lead to an unexpected issue: typing e.g. =setq!= will not match ~setq!~ -due to the postfix without literal match (you need to type =setq!==). This is -undesireable since doom uses a lot of macros that end with =!=. Having the -dispatching work in both post and prefix is useful (since it lets you do -post-hoc changes to your typing), but having a one-off extention is inconsistant - +Currently the =!= style dispatcher is only as a prefix, due to the abundance of +=!= final macros. In my opinion this is useful enough to break consistency. * PROJ HACKs to be addressed ** ~fboundp~ issues Even if the =ivy= module isn't loaded, it's packages can still get loaded by diff --git a/modules/completion/selectrum/config.el b/modules/completion/selectrum/config.el index b7d396c07..f4321e398 100644 --- a/modules/completion/selectrum/config.el +++ b/modules/completion/selectrum/config.el @@ -55,7 +55,6 @@ ((string= "!" pattern) `(orderless-literal . "")) ;; Without literal ((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1))) - ((string-suffix-p "!" pattern) `(orderless-without-literal . ,(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)))