completion/ivy: add +fuzzy flag

As mentioned in #626
This commit is contained in:
Henrik Lissner 2018-05-30 11:25:41 +02:00
parent 31d34ae5f0
commit a25e2e0c89
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 16 additions and 0 deletions

View file

@ -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))

View file

@ -10,5 +10,8 @@
(package! ivy-rich)
(package! wgrep)
(when (featurep! +fuzzy)
(package! flx))
(when (and EMACS26+ (featurep! +childframe))
(package! ivy-posframe))