From 412ced231bf671d7a21e7db947bd48fb80a94de5 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sun, 21 Mar 2021 15:09:07 +0100 Subject: [PATCH] Use marginalia for annotations in selection interfaces --- modules/emacs/init.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/emacs/init.el b/modules/emacs/init.el index 9fb07332..4d94cbab 100644 --- a/modules/emacs/init.el +++ b/modules/emacs/init.el @@ -44,7 +44,7 @@ "ws" '(split-window-horizontally :which-key "split horizontal") "wd" '(delete-window :which-key "delete") - "x" '(M-x :which-key "exec") + "x" '(execute-extended-command :which-key "exec") ) ) @@ -136,6 +136,18 @@ ) ) +;; Annotations in selection interface +(use-package marginalia + :demand t + :custom + (marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil)) + :config + (marginalia-mode) + (advice-add #'marginalia-cycle :after (lambda () (selectrum-exhibit 'keep-selected))) + :general + (:keymaps 'minibuffer-local-map "M-a" 'marginalia-cycle) + ) + ;; Markdown syntax support (use-package markdown-mode :commands (markdown-mode gfm-mode)