about summary refs log tree commit diff
path: root/init
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-06-12T22·09+0200
committerVincent Ambo <mail@tazj.in>2018-06-12T22·09+0200
commita6a0e28e116e2e8d8826bbc1d3711f3615e919e0 (patch)
tree5dc79c588349c57fdcd92fd554ef9bdfd6c7b787 /init
parentebc1dd1a18857ff7d63f09236552ddaf43885cb2 (diff)
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
Diffstat (limited to 'init')
-rw-r--r--init/settings.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/init/settings.el b/init/settings.el
index 904f6eda031f..a32528012b4e 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)