selectrum: remove automatic initialisms for M-x etc

Doesn't work if we want to use selectrum highlighting optimizations, see
raxod502/selectrum#539.

Also document `SPC /` being slow.
This commit is contained in:
Itai Y. Efrat 2021-05-17 13:42:45 +03:00
parent 157a6c5c4b
commit c349a0a046
3 changed files with 7 additions and 17 deletions

View file

@ -150,9 +150,9 @@ A wgrep buffer can be opened from swiper with =C-c C-e=.
** Orderless filtering ** Orderless filtering
When using orderless to filter through candidates, the default behaviour is for 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 inputs to match the candidate as a regular expression or
literally. In ~command~ and ~symbol~ category searches such as =SPC h f= and =SPC literally.
h v=, matching by initialism is also on by default. You can further specify each
space separated input in the following ways: You can further specify each space separated input in the following ways:
| Input | Description | | Input | Description |
|------------------+--------------------------------------------| |------------------+--------------------------------------------|
| =!foo= or =foo!= | match without literal input =foo= | | =!foo= or =foo!= | match without literal input =foo= |

View file

@ -38,13 +38,9 @@ enter, it opens the new buffer in another window rather than the main one, even
though at least the bookmark function ostensibly uses though at least the bookmark function ostensibly uses
~pop-to-buffer-same-window~. Ivy gets the window switched in the bookmarks and ~pop-to-buffer-same-window~. Ivy gets the window switched in the bookmarks and
grep case due to a custom ivy occur window switching function. grep case due to a custom ivy occur window switching function.
** TODO ~orderless+initialism~ doesn't work for some reason ** TODO selectrum =SPC /= is much slower than ivy =SPC /=
See https://github.com/oantolin/orderless/issues/54. requires further investigation. is ~consult-ripgrep~ slower than ~counsel-rg~?
Narrowed it down to the fact that it works if ~selectrum-mode~ is off, but is it something the custom search function is doing? does ivy cache stuff?
doesn't if it's on (even without the ~use-package~ configuration).
However, it has no problem working with selectrum with a MWE using ~emacs -Q~,
so it might be caused by some nontrivial doomism in the area.
* PROJ Missing Features * PROJ Missing Features
** TODO Icons ** TODO Icons
https://github.com/minad/marginalia/issues/59 https://github.com/minad/marginalia/issues/59

View file

@ -65,16 +65,10 @@
;; Flex matching ;; Flex matching
((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1))) ((string-prefix-p "~" pattern) `(orderless-flex . ,(substring pattern 1)))
((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1))))) ((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1)))))
(orderless-define-completion-style orderless+initialism
(orderless-matching-styles '(orderless-initialism
orderless-literal
orderless-regexp)))
(setq completion-styles '(orderless) (setq completion-styles '(orderless)
completion-category-defaults nil completion-category-defaults nil
;; note that despite override in the name orderless can still be used in find-file etc. ;; note that despite override in the name orderless can still be used in find-file etc.
completion-category-overrides '((file (styles . (partial-completion))) completion-category-overrides '((file (styles . (partial-completion))))
(command (styles orderless+initialism))
(symbol (styles orderless+initialism)))
orderless-style-dispatchers '(+selectrum-orderless-dispatch) orderless-style-dispatchers '(+selectrum-orderless-dispatch)
orderless-component-separator "[ &]" orderless-component-separator "[ &]"
selectrum-refine-candidates-function #'orderless-filter selectrum-refine-candidates-function #'orderless-filter