From 59bc7653d5bbdbdb9eaa17b09c3c0ccbd0db90b3 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Aug 2018 00:29:26 +0200 Subject: [PATCH] completion/ivy: remove flx #774 flx is much too slow with large lists of candidates (i.e. counsel-projectile-find-file). --- modules/completion/ivy/config.el | 24 ++++++++++-------------- modules/completion/ivy/packages.el | 3 --- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 8e71b9e10..9369efcfc 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -57,6 +57,16 @@ immediately runs it on the current candidate (ending the ivy session)." ;; enable ability to select prompt (alternative to `ivy-immediate-done') ivy-use-selectable-prompt t) + (when (featurep! +fuzzy) + (setq ivy-re-builders-alist + '((counsel-ag . ivy--regex-plus) + (counsel-rg . ivy--regex-plus) + (counsel-pt . ivy--regex-plus) + (counsel-grep . ivy--regex-plus) + (swiper . ivy--regex-plus) + (t . ivy--regex-fuzzy)) + ivy-initial-inputs-alist nil)) + (after! yasnippet (add-to-list 'yas-prompt-functions #'+ivy-yas-prompt nil #'eq)) @@ -210,20 +220,6 @@ immediately runs it on the current candidate (ending the ivy session)." (setf (alist-get fn ivy-display-functions-alist) #'ivy-display-function-fallback))) -(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 . ivy--regex-plus) - (swiper . ivy--regex-plus) - (t . ivy--regex-fuzzy)) - ivy-initial-inputs-alist nil)) - - ;; Used by `counsel-M-x' (setq amx-save-file (concat doom-cache-dir "amx-items")) diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index ace65cf1b..888368ce1 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -10,8 +10,5 @@ (package! ivy-rich) (package! wgrep) -(when (featurep! +fuzzy) - (package! flx)) - (when (and EMACS26+ (featurep! +childframe)) (package! ivy-posframe))