Closed hongyi-zhao closed 1 year ago
I haven't used Swiper or Ivy (the completion framework it depends on) recently, but at the time I wrote the Orderless documentation it used to be true that Ivy did not use completion-styles
at all. I did write some separate Ivy integration instructions in the Orderless manual. That link just says to use this configuration:
(setq ivy-re-builders-alist '((t . orderless-ivy-re-builder)))
(add-to-list 'ivy-highlight-functions-alist '(orderless-ivy-re-builder . orderless-ivy-highlight))
Please let me know if that works.
Thank you for your comments. The following configuration does the trick:
(use-package orderless
:ensure t
:custom
(completion-styles '(orderless basic))
(completion-category-overrides '((file (styles basic partial-completion)))))
;;https://writequit.org/denver-emacs/presentations/2017-04-11-ivy.html#orgc2d4898
(use-package ivy
:demand
:config
(setq ivy-use-virtual-buffers t
enable-recursive-minibuffers t
ivy-count-format "%d/%d "
ivy-re-builders-alist '((t . orderless-ivy-re-builder))
)
(add-to-list 'ivy-highlight-functions-alist '(orderless-ivy-re-builder . orderless-ivy-highlight))
)
;;https://github.com/abo-abo/swiper/issues/2899#issuecomment-890300284
(use-package swiper
:bind ("C-s" . swiper)
)
I try to test orderless using a customized
init.el.debug
file as follows:See the testing results below:
But the following gives nothing:
Any tips for fixing this problem?
Regards, Zhao