mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: tweak the completion-category-overrides
This commit is contained in:
parent
6d4b0527a5
commit
4b5d83b693
|
|
@ -22,40 +22,33 @@
|
||||||
(eager-update . t)))
|
(eager-update . t)))
|
||||||
(eager-update-properties-no-sort (append eager-update-properties (list (cons 'display-sort-function #'identity)))))
|
(eager-update-properties-no-sort (append eager-update-properties (list (cons 'display-sort-function #'identity)))))
|
||||||
(setq completion-category-overrides
|
(setq completion-category-overrides
|
||||||
`((file . ((styles . (partial-completion))
|
`((file . (,@eager-update-properties
|
||||||
(eager-display . nil)
|
(styles . (partial-completion))
|
||||||
(eager-update . t)
|
|
||||||
(group-function . ,#'prot-minibuffer-file-group)
|
(group-function . ,#'prot-minibuffer-file-group)
|
||||||
(affixation-function . ,#'prot-minibuffer-file-affixate)
|
(affixation-function . ,#'prot-minibuffer-file-affixate)
|
||||||
(display-sort-function . ,#'prot-minibuffer-file-sort)))
|
(display-sort-function . ,#'prot-minibuffer-file-sort)))
|
||||||
(bookmark . (,@eager-update-properties
|
(buffer . (,@eager-update-properties
|
||||||
(affixation-function . ,#'prot-minibuffer-bookmark-affixate)))
|
(affixation-function . ,#'prot-minibuffer-buffer-affixate)))
|
||||||
(project-file . (,@eager-update-properties
|
(project-file . (,@eager-update-properties
|
||||||
(group-function . ,#'prot-minibuffer-file-group)
|
(group-function . ,#'prot-minibuffer-file-group)
|
||||||
(affixation-function . ,#'prot-minibuffer-file-affixate)))
|
(affixation-function . ,#'prot-minibuffer-file-affixate)))
|
||||||
(prot-minibuffer-library . (,@eager-update-properties
|
(prot-minibuffer-library . (,@eager-update-properties
|
||||||
(annotation-function . ,#'prot-minibuffer-library-annotate)
|
(annotation-function . ,#'prot-minibuffer-library-annotate)
|
||||||
(display-sort-function . ,#'prot-minibuffer-library-sort)))
|
(display-sort-function . ,#'prot-minibuffer-library-sort)))
|
||||||
(symbol-help . (,@eager-update-properties
|
(bookmark . (,@eager-update-properties
|
||||||
(group-function . ,#'prot-minibuffer-symbol-group)
|
(affixation-function . ,#'prot-minibuffer-bookmark-affixate)))
|
||||||
(display-sort-function . ,#'prot-minibuffer-symbol-sort)))
|
(command . (,@eager-update-properties
|
||||||
(buffer . (,@eager-update-properties
|
(affixation-function . nil) ; so that the `annotation-function' can take effect
|
||||||
;; NOTE 2026-07-25: I am disabling this because it messes up with the sorting.
|
|
||||||
;; (group-function . ,#'prot-minibuffer-buffer-group)
|
|
||||||
(affixation-function . ,#'prot-minibuffer-buffer-affixate)
|
|
||||||
(display-sort-function . ,#'prot-minibuffer-buffer-sort)))
|
|
||||||
(command . ((affixation-function . nil)
|
|
||||||
(annotation-function . ,#'prot-minibuffer-command-annotate)))
|
(annotation-function . ,#'prot-minibuffer-command-annotate)))
|
||||||
|
(symbol-help . ,eager-update-properties)
|
||||||
(denote-file . ,eager-update-properties)
|
(denote-file . ,eager-update-properties)
|
||||||
(prot-minibuffer-emoji . ,eager-update-properties)
|
(prot-minibuffer-emoji . ,eager-update-properties)
|
||||||
(theme . ,eager-update-properties)
|
(theme . ,eager-update-properties)
|
||||||
(unicode-name . ,eager-update-properties)
|
(unicode-name . ,eager-update-properties)
|
||||||
(imenu . ,eager-update-properties-no-sort)
|
(imenu . ,eager-update-properties-no-sort)
|
||||||
(consult-location . ,eager-update-properties-no-sort)
|
(consult-location . ,eager-update-properties-no-sort)
|
||||||
(prot-minibuffer-kill-ring . ((eager-display . t)
|
(prot-minibuffer-pass . ,eager-update-properties-no-sort)
|
||||||
(eager-update . t)
|
(prot-minibuffer-kill-ring . ,eager-update-properties-no-sort)))))
|
||||||
(display-sort-function . identity)))
|
|
||||||
(prot-minibuffer-pass . ((display-sort-function . minibuffer-sort-by-history)))))))
|
|
||||||
|
|
||||||
;;; Orderless completion style (and prot-orderless.el)
|
;;; Orderless completion style (and prot-orderless.el)
|
||||||
(when prot-emacs-completion-extras
|
(when prot-emacs-completion-extras
|
||||||
|
|
|
||||||
|
|
@ -4192,40 +4192,33 @@ for this.
|
||||||
(eager-update . t)))
|
(eager-update . t)))
|
||||||
(eager-update-properties-no-sort (append eager-update-properties (list (cons 'display-sort-function #'identity)))))
|
(eager-update-properties-no-sort (append eager-update-properties (list (cons 'display-sort-function #'identity)))))
|
||||||
(setq completion-category-overrides
|
(setq completion-category-overrides
|
||||||
`((file . ((styles . (partial-completion))
|
`((file . (,@eager-update-properties
|
||||||
(eager-display . nil)
|
(styles . (partial-completion))
|
||||||
(eager-update . t)
|
|
||||||
(group-function . ,#'prot-minibuffer-file-group)
|
(group-function . ,#'prot-minibuffer-file-group)
|
||||||
(affixation-function . ,#'prot-minibuffer-file-affixate)
|
(affixation-function . ,#'prot-minibuffer-file-affixate)
|
||||||
(display-sort-function . ,#'prot-minibuffer-file-sort)))
|
(display-sort-function . ,#'prot-minibuffer-file-sort)))
|
||||||
(bookmark . (,@eager-update-properties
|
(buffer . (,@eager-update-properties
|
||||||
(affixation-function . ,#'prot-minibuffer-bookmark-affixate)))
|
(affixation-function . ,#'prot-minibuffer-buffer-affixate)))
|
||||||
(project-file . (,@eager-update-properties
|
(project-file . (,@eager-update-properties
|
||||||
(group-function . ,#'prot-minibuffer-file-group)
|
(group-function . ,#'prot-minibuffer-file-group)
|
||||||
(affixation-function . ,#'prot-minibuffer-file-affixate)))
|
(affixation-function . ,#'prot-minibuffer-file-affixate)))
|
||||||
(prot-minibuffer-library . (,@eager-update-properties
|
(prot-minibuffer-library . (,@eager-update-properties
|
||||||
(annotation-function . ,#'prot-minibuffer-library-annotate)
|
(annotation-function . ,#'prot-minibuffer-library-annotate)
|
||||||
(display-sort-function . ,#'prot-minibuffer-library-sort)))
|
(display-sort-function . ,#'prot-minibuffer-library-sort)))
|
||||||
(symbol-help . (,@eager-update-properties
|
(bookmark . (,@eager-update-properties
|
||||||
(group-function . ,#'prot-minibuffer-symbol-group)
|
(affixation-function . ,#'prot-minibuffer-bookmark-affixate)))
|
||||||
(display-sort-function . ,#'prot-minibuffer-symbol-sort)))
|
(command . (,@eager-update-properties
|
||||||
(buffer . (,@eager-update-properties
|
(affixation-function . nil) ; so that the `annotation-function' can take effect
|
||||||
;; NOTE 2026-07-25: I am disabling this because it messes up with the sorting.
|
|
||||||
;; (group-function . ,#'prot-minibuffer-buffer-group)
|
|
||||||
(affixation-function . ,#'prot-minibuffer-buffer-affixate)
|
|
||||||
(display-sort-function . ,#'prot-minibuffer-buffer-sort)))
|
|
||||||
(command . ((affixation-function . nil)
|
|
||||||
(annotation-function . ,#'prot-minibuffer-command-annotate)))
|
(annotation-function . ,#'prot-minibuffer-command-annotate)))
|
||||||
|
(symbol-help . ,eager-update-properties)
|
||||||
(denote-file . ,eager-update-properties)
|
(denote-file . ,eager-update-properties)
|
||||||
(prot-minibuffer-emoji . ,eager-update-properties)
|
(prot-minibuffer-emoji . ,eager-update-properties)
|
||||||
(theme . ,eager-update-properties)
|
(theme . ,eager-update-properties)
|
||||||
(unicode-name . ,eager-update-properties)
|
(unicode-name . ,eager-update-properties)
|
||||||
(imenu . ,eager-update-properties-no-sort)
|
(imenu . ,eager-update-properties-no-sort)
|
||||||
(consult-location . ,eager-update-properties-no-sort)
|
(consult-location . ,eager-update-properties-no-sort)
|
||||||
(prot-minibuffer-kill-ring . ((eager-display . t)
|
(prot-minibuffer-pass . ,eager-update-properties-no-sort)
|
||||||
(eager-update . t)
|
(prot-minibuffer-kill-ring . ,eager-update-properties-no-sort)))))
|
||||||
(display-sort-function . identity)))
|
|
||||||
(prot-minibuffer-pass . ((display-sort-function . minibuffer-sort-by-history)))))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** The =prot-emacs-completion.el= for the ~orderless~ completion style
|
*** The =prot-emacs-completion.el= for the ~orderless~ completion style
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue