diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 822434c23..13dbb6cf0 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -220,3 +220,16 @@ immediately runs it on the current candidate (ending the ivy session)." ;; posframe doesn't work well with async sources (dolist (fn '(swiper counsel-rg counsel-ag counsel-pt counsel-grep counsel-git-grep)) (map-put ivy-display-functions-alist fn nil))) + + +(def-package! flx + :when (featurep! +fuzzy) + :defer t ; is loaded by ivy + :init + (setq ivy-re-builders-alist + '((counsel-ag . ivy--regex-plus) + (counsel-rg . ivy--regex-plus) + (counsel-pt . ivy--regex-plus) + (counsel-grep-or-swiper . ivy--regex-plus) + (t . ivy--regex-fuzzy)) + ivy-initial-inputs-alist nil)) diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index 0d764a54d..b8b76609a 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -10,5 +10,8 @@ (package! ivy-rich) (package! wgrep) +(when (featurep! +fuzzy) + (package! flx)) + (when (and EMACS26+ (featurep! +childframe)) (package! ivy-posframe))