From 35b88a597b734188418f1b1f50d4e093ba02fb83 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Aug 2018 21:37:42 +0200 Subject: [PATCH] Activate ivy-prescient-mode on ivy-mode --- modules/completion/ivy/config.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 78a3d25b8..ee21b361d 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -176,7 +176,7 @@ immediately runs it on the current candidate (ending the ivy session)." (def-package! ivy-prescient - :after ivy + :hook (ivy-mode . ivy-prescient-mode) :init (if (featurep! +fuzzy) (setq prescient-filter-method 'fuzzy) @@ -184,6 +184,7 @@ immediately runs it on the current candidate (ending the ivy session)." ivy-prescient-retain-classic-highlighting t)) :config (setq prescient-save-file (concat doom-cache-dir "presclient-save.el")) + (prescient-persist-mode +1) ;; `ivy-prescient' is too slow for fuzzy projectile-find-file and ;; counsel-file-jump, so ensure they're ignored @@ -191,10 +192,7 @@ immediately runs it on the current candidate (ending the ivy session)." (add-to-list 'ivy-re-builders-alist '(counsel-file-jump . +ivy--regex-fuzzy)) (add-to-list 'ivy-re-builders-alist '(projectile-find-file . +ivy--regex-fuzzy))) (add-to-list 'ivy-prescient-excluded-commands 'counsel-find-jump nil #'eq) - (add-to-list 'ivy-prescient-excluded-commands 'projectile-find-file nil #'eq) - - (prescient-persist-mode +1) - (ivy-prescient-mode +1)) + (add-to-list 'ivy-prescient-excluded-commands 'projectile-find-file nil #'eq)) (def-package! wgrep