commit 0d546b02cf934c7552a6bf98a50c232f819137f9
parent 27afa5d869eefb4cb9fbb5c040bfd58772852f56
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Tue,  9 Aug 2022 23:54:53 +0200
emacs: add prescient
Diffstat:
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org
@@ -220,7 +220,7 @@ Minor mode for Emacs that displays the key bindings following your currently ent
     (which-key-mode))
 #+end_src
 
-** counsel + ivy + swiper
+** counsel + ivy + swiper + prescient
 Better incremental completion and selection narrowing.
 And a bunch more.
 Generally makes for nicer interactivity, like ido mode on steroids.
@@ -230,28 +230,34 @@ The components:
 - ivy: generic completion mechanism
 - counsel: collection of common Emacs commands enhanced using ivy
 - swiper: search enhanced using ivy
-
-#+begin_src emacs-lisp
-  (use-package counsel :demand
-    :config
-    (setq ivy-use-virtual-buffers t       ; extend searching to bookmarks and
-          ivy-height 20                   ; set height of the ivy window
-          ivy-count-format "(%d/%d) "     ; count format, from the ivy help page
-          ivy-display-style 'fancy
-          ivy-format-function 'ivy-format-function-line)
-    (ivy-mode)
-    (counsel-mode)
-
-    (defun edit-script ()
-      "Edit a file in ~/.scripts/"
-      (interactive)
-      (let ((input (ivy--input)))
-        (ivy-quit-and-run (counsel-file-jump nil "~/.scripts/"))))
-    (defun edit-config ()
-      "Edit a file in ~/.dotfiles/"
-      (interactive)
-      (let ((input (ivy--input)))
-        (ivy-quit-and-run (counsel-file-jump nil "~/.dotfiles/")))))
+- prescient: scoring system for M-x
+
+#+begin_src emacs-lisp
+      (use-package counsel :demand
+        :config
+        (setq ivy-use-virtual-buffers t       ; extend searching to bookmarks and
+              ivy-height 20                   ; set height of the ivy window
+              ivy-count-format "(%d/%d) "     ; count format, from the ivy help page
+              ivy-display-style 'fancy
+              ivy-format-function 'ivy-format-function-line)
+        (ivy-mode)
+        (counsel-mode)
+
+        (defun edit-script ()
+          "Edit a file in ~/.scripts/"
+          (interactive)
+          (let ((input (ivy--input)))
+            (ivy-quit-and-run (counsel-file-jump nil "~/.scripts/"))))
+        (defun edit-config ()
+          "Edit a file in ~/.dotfiles/"
+          (interactive)
+          (let ((input (ivy--input)))
+            (ivy-quit-and-run (counsel-file-jump nil "~/.dotfiles/")))))
+
+      (use-package prescient :config (prescient-persist-mode))
+      (use-package ivy-prescient :config
+        (setq ivy-prescient-retain-classic-highlighting t)
+        (ivy-prescient-mode))
 #+end_src
 
 Set the key bindings: