|
@ -638,22 +638,42 @@ As an alternative to ivy/counsel/swiper? |
|
|
* Selectrum & Co. |
|
|
* Selectrum & Co. |
|
|
Uses default features of emacs instead of bringing a new framework in like helm or counsel |
|
|
Uses default features of emacs instead of bringing a new framework in like helm or counsel |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
;; either selectrum or vertico |
|
|
(use-package selectrum |
|
|
(use-package selectrum |
|
|
:ensure t |
|
|
:ensure t |
|
|
:config |
|
|
:config |
|
|
(selectrum-mode) |
|
|
(selectrum-mode) |
|
|
) |
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
;; as of 2021-10-29 debian emacs 27.1 seems to cause error |
|
|
|
|
|
;; error in post-command-hook (vertico--exhibit): (wrong-type-argument .....) |
|
|
|
|
|
;; see https://github.com/minad/vertico/issues/41 |
|
|
|
|
|
;(use-package vertico |
|
|
|
|
|
; :ensure t |
|
|
|
|
|
; :init |
|
|
|
|
|
; (vertico-mode)) |
|
|
|
|
|
|
|
|
|
|
|
;; orderless orders by recency |
|
|
|
|
|
;; prescient orders by frequency |
|
|
|
|
|
;; both combined order by frecency (most recent first, then by frequency, then by length) |
|
|
(use-package orderless |
|
|
(use-package orderless |
|
|
:ensure t |
|
|
:ensure t |
|
|
|
|
|
:config |
|
|
|
|
|
;; optional performance optimizaion |
|
|
|
|
|
;; by highlighting only visible candidates |
|
|
|
|
|
(setq orderless-skip-highlighting (lambda () selectrum-is-active) |
|
|
|
|
|
selectrum-highlight-candidates-function #'orderless-highlight-matches |
|
|
|
|
|
completion-category-defaults nil |
|
|
|
|
|
completion-category-overrides '((file (styles . (partial-completion))))) |
|
|
:custom |
|
|
:custom |
|
|
(completion-styles '(orderless)) |
|
|
(completion-styles '(orderless)) |
|
|
|
|
|
(savehist-mode) |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
(use-package selectrum-prescient |
|
|
(use-package selectrum-prescient |
|
|
:ensure t |
|
|
:ensure t |
|
|
:config |
|
|
:config |
|
|
(setq selectrum-prescient-enable-filtering nil) |
|
|
|
|
|
|
|
|
(setq selectrum-prescient-enable-filtering nil) ; only if used with orderless |
|
|
(selectrum-prescient-mode) |
|
|
(selectrum-prescient-mode) |
|
|
(prescient-persist-mode) |
|
|
(prescient-persist-mode) |
|
|
) |
|
|
) |
|
|