mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
The default 'marginalia-annotate-command annotation method for M-x candidates has a small but perceivable performance impact as you type. The 'marginalia-annotate-binding method does not have any perceivable performance impact. Also I only really care about seeing keybindings in the M-x list, I can definitely live without command descriptions.
32 lines
863 B
EmacsLisp
32 lines
863 B
EmacsLisp
;;; siren-marginalia.el --- jimeh's Emacs Siren: marginalia configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for marginalia.
|
|
|
|
;;; Code:
|
|
|
|
(use-package marginalia
|
|
:bind (:map minibuffer-local-map
|
|
("M-A" . marginalia-cycle))
|
|
:init
|
|
(marginalia-mode +1)
|
|
|
|
(defun siren-marginalia-setup ()
|
|
(interactive)
|
|
(mapc
|
|
(lambda (x)
|
|
(pcase (car x)
|
|
;; Default command category to 'marginalia-annotate-binding instead of
|
|
;; 'marginalia-annotate-command which has a slight performance impact
|
|
;; when filtering M-x candidates.
|
|
('command (setcdr x (cons 'marginalia-annotate-binding
|
|
(remq 'marginalia-annotate-binding (cdr x)))))))
|
|
marginalia-annotator-registry))
|
|
|
|
:config
|
|
(siren-marginalia-setup))
|
|
|
|
(provide 'siren-marginalia)
|
|
;;; siren-marginalia.el ends here
|