diff --git a/modules/completion/selectrum/README.org b/modules/completion/selectrum/README.org index 5bfae6993..eb641c518 100644 --- a/modules/completion/selectrum/README.org +++ b/modules/completion/selectrum/README.org @@ -23,8 +23,8 @@ TODO #+end_quote ** Module Flags -+ ~+prescient~ Enables prescient filtering and sorting for Selectrum searches. -+ ~+orderless~ Enables orderless filtering for Selectrum searches. ++ ~+prescient~ Enables prescient filtering and sorting for Selectrum searches + instead of orderless. ** Plugins [[https://github.com/raxod502/selectrum][selectrum]] @@ -32,8 +32,8 @@ TODO [[https://github.com/oantolin/embark/][embark]] [[https://github.com/oantolin/embark/][embark-consult]] [[https://github.com/minad/marginalia][marginalia]] -[[https://github.com/raxod502/prescient.el][prescient]]* (~+prescient~) -[[https://github.com/oantolin/orderless][orderless]]* (~+orderless~) +[[https://github.com/oantolin/orderless][orderless]] (unless ~+prescient~) +[[https://github.com/raxod502/prescient.el][prescient]] (~+prescient~) [[https://github.com/minad/consult/][consult-flycheck]] (~:checkers syntax~) * Prerequisites diff --git a/modules/completion/selectrum/config.el b/modules/completion/selectrum/config.el index 3e7ec61b5..065711130 100644 --- a/modules/completion/selectrum/config.el +++ b/modules/completion/selectrum/config.el @@ -6,7 +6,7 @@ (setq selectrum-display-action nil selectrum-num-candidates-displayed 15 selectrum-extend-current-candidate-highlight t) - (unless (featurep! +orderless) + (when (featurep! +prescient) (setq completion-styles '(substring partial-completion))) :config (setq selectrum-fix-vertical-window-height 17 @@ -55,7 +55,7 @@ `(orderless-without-literal . ,(substring pattern 1)))) (use-package! orderless - :when (featurep! +orderless) + :when (not (featurep! +prescient)) :after selectrum :init (setq orderless-component-separator "[ &]" diff --git a/modules/completion/selectrum/packages.el b/modules/completion/selectrum/packages.el index aa525443e..fa16b4828 100644 --- a/modules/completion/selectrum/packages.el +++ b/modules/completion/selectrum/packages.el @@ -3,10 +3,8 @@ (package! selectrum :pin "093f7e96a323179ee2a68a5a674e7fa2c5d721b8") -(when (featurep! +prescient) - (package! selectrum-prescient :pin "ed2b762241bbea03e374dc9dcd4fbe207c6b2ea4")) - -(when (featurep! +orderless) +(if (featurep! +prescient) + (package! selectrum-prescient :pin "ed2b762241bbea03e374dc9dcd4fbe207c6b2ea4") (package! orderless :pin "87ab7e47e343285f7afd42779c78551332b8fd84")) (package! consult :pin "e04a404c8d8ca137be2b3b7cf664a11712639c31")