From d37d733f5b07a490b5e3b677260ec15862a7ef82 Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Wed, 7 Jun 2023 16:09:47 +0200 Subject: [PATCH] feat: use fuzzy search in swiper, ignore order search in all others Can switch this at runtime using hydra (C-o M). --- config.org | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config.org b/config.org index 9d07ba9..859ad9c 100644 --- a/config.org +++ b/config.org @@ -263,7 +263,7 @@ Fuzzy matching: https://github.com/lewang/flx #+begin_src emacs-lisp -;; (use-package flx) +(use-package flx) #+end_src ** Ivy @@ -285,12 +285,13 @@ https://github.com/abo-abo/swiper ("C-x C-s" . wgrep-finish-edit) ("C-q" . wgrep-abort-changes) ) - ;; FYI: to enable fuzzy search everywhere, can be limited to certain commands - ;; See: https://oremacs.com/swiper/#completion-styles - ;; :init - ;; (setq ivy-re-builders-alist - ;; '((t . ivy--regex-fuzzy))) :config + (setq ivy-re-builders-alist + '( + (swiper . ivy--regex-fuzzy) + (t . ivy--regex-ignore-order) + ) + ) (setq ivy-use-virtual-buffers t) ;; Add recent files + bookmarks to ivy-switch-buffer (setq ivy-count-format "(%d/%d) ") ;; Style to use for displaying current candidate count (ivy-mode)