fixed completion styles to match smex's behavior

This commit is contained in:
2023-05-20 10:36:19 +02:00
parent 84d9f4f8dd
commit 1f324df21f

View File

@@ -50,10 +50,17 @@ via [[http://whattheemacsd.com/setup-ido.el-02.html][whattheemacs.d]]"
(use-package orderless (use-package orderless
:init :init
;; Configure a custom style dispatcher (see the Consult wiki) ;; I am using the actual orderless completion style as a last
;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch) ;; resort. Although it is very flexible, it requires me to enter a
;; orderless-component-separator #'orderless-escapable-split-on-space) ;; space (or whatever one configures as separator), which is also
(setq completion-styles '(substring orderless basic) ;; annoying. So, I start with emacs standard (basic), if that
;; doesn't suffice, initials finds commands by initials which I am
;; used to because smex worked that way already. If that doesn't
;; suffice I use the flex style which is fuzzy searching (w/o
;; separator) just like what smex did as well. And only after that
;; comes orderless. Maybe I'll change this in the future or throw
;; orderless completely away...
(setq completion-styles '(basic initials flex orderless)
orderless-matching-styles '(orderless-prefixes) orderless-matching-styles '(orderless-prefixes)
completion-category-defaults nil completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion))))) completion-category-overrides '((file (styles partial-completion)))))