From a6a0e28e116e2e8d8826bbc1d3711f3615e919e0 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 13 Jun 2018 00:09:16 +0200 Subject: [PATCH] refactor(settings): Use prescient together with ivy Ivy's regex-based fuzzy matching can occasionally be slow, which was getting on my nerves. This switches the completion engine to prescient[1] which promises to be faster. Experimental testing in large files like the `configuration.nix` man page looks promissing. [1]: https://github.com/raxod502/prescient.el --- init/settings.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init/settings.el b/init/settings.el index 904f6eda0..a32528012 100644 --- a/init/settings.el +++ b/init/settings.el @@ -1,3 +1,5 @@ +(require 'prescient) +(require 'ivy-prescient) (require 'uniquify) (require 'password-store) (require 'ivy-pass) @@ -9,9 +11,9 @@ (setq ivy-use-virtual-buffers t) (setq enable-recursive-minibuffers t) -;; Enable fuzzy matching in ivy (requires flx installed for sane -;; ordering) -(setq ivy-re-builders-alist '((t . ivy--regex-fuzzy))) +;; Enable support for prescient in ivy +(ivy-prescient-mode) +(prescient-persist-mode) ;; Move files to trash when deleting (setq delete-by-moving-to-trash t)