feat(completion): Add configuration for prescient and selectrum

I'm not fully convinced with swapping out ido with selectrum, so I'll
add the configuration for both, without actually loading them, and
instead manually try them out from time to time.

Also, make ivy use prescient for filtering and sorting, as it does a
much better job than ivy itself does by default. But nothing currently
uses ivy either, so it's more for future if I start using ivy somewhere.
This commit is contained in:
2020-03-21 22:52:01 +00:00
parent c8802b358b
commit 07657bbb73
3 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
;;; siren-prescient.el --- jimeh's Emacs Siren: prescient configuration.
;;; Commentary:
;; Basic configuration for prescient.
;;; Code:
(use-package prescient
:defer t
:custom
(prescient-filter-method '(literal regexp initialism fuzzy))
(prescient-save-file (expand-file-name "prescient-save.el" siren-cache-dir)))
(provide 'siren-prescient)
;;; siren-prescient.el ends here

View File

@@ -6,6 +6,8 @@
;;; Code:
(require 'siren-prescient)
(use-package ivy
:defer t
@@ -15,5 +17,11 @@
(ivy-re-builders-alist '((amx-completing-read-ivy . ivy--regex-fuzzy)
(t . ivy--regex-plus))))
(use-package ivy-prescient
:after (ivy)
:config
(ivy-prescient-mode +1))
(provide 'siren-ivy)
;;; siren-ivy.el ends here

View File

@@ -0,0 +1,26 @@
;;; siren-selectrum.el --- jimeh's Emacs Siren: selectrum configuration.
;;; Commentary:
;; Basic configuration for selectrum.
;;; Code:
(require 'siren-prescient)
(use-package selectrum
:straight (:host github :repo "raxod502/selectrum")
:config
(selectrum-mode +1))
(use-package selectrum-prescient
:straight (:host github :repo "raxod502/prescient.el"
:files ("selectrum-prescient.el"))
:after (selectrum)
:config
(selectrum-prescient-mode +1))
(provide 'siren-selectrum)
;;; siren-selectrum.el ends here