From 07657bbb7307be9a4ff4fc01c1ae4174d1532118 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 21 Mar 2020 22:52:01 +0000 Subject: [PATCH] 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. --- modules/completion/siren-prescient.el | 17 +++++++++++++++++ modules/editor/siren-ivy.el | 8 ++++++++ modules/editor/siren-selectrum.el | 26 ++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 modules/completion/siren-prescient.el create mode 100644 modules/editor/siren-selectrum.el diff --git a/modules/completion/siren-prescient.el b/modules/completion/siren-prescient.el new file mode 100644 index 0000000..0b874f3 --- /dev/null +++ b/modules/completion/siren-prescient.el @@ -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 diff --git a/modules/editor/siren-ivy.el b/modules/editor/siren-ivy.el index 569b358..6079d5b 100644 --- a/modules/editor/siren-ivy.el +++ b/modules/editor/siren-ivy.el @@ -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 diff --git a/modules/editor/siren-selectrum.el b/modules/editor/siren-selectrum.el new file mode 100644 index 0000000..cbb2714 --- /dev/null +++ b/modules/editor/siren-selectrum.el @@ -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