From 1934c157f281c02b07909dd47950947a2aa8dcb2 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 27 Feb 2024 15:22:26 -0500 Subject: [PATCH] Add new marginalia categories --- config.org | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config.org b/config.org index 5f54a0a..d8b7e07 100644 --- a/config.org +++ b/config.org @@ -1406,6 +1406,32 @@ that provides the most information and I don't mind the space it takes up. (setq eldoc-documentation-strategy 'eldoc-documentation-compose)) #+end_src +** Marginalia + +#+call: confpkg("!Pkg marginalia") + +Marginalia mostly works fine on its own, but we should add a few more +Doom-specific prompt categories to its registry. + +#+begin_src emacs-lisp +(after! marginalia + ;; Workspace and project categories + (pushnew! marginalia-prompt-categories + '("\\" . workspace) + '("\\" . known-project)) + + ;; Annotate equivalently to files + (pushnew! marginalia-annotator-registry + '(known-project marginalia-annotate-file builtin none)) + + ;; Remove special case for projectile-switch-project + ;; (now covered by known-project category) + (setf (alist-get #'projectile-switch-project marginalia-command-categories nil t) nil)) +#+end_src + +These new categories can then be used to define [[*Keymaps][Embark keymaps]] for minibuffer +completion. + ** Embark #+call: confpkg("!Pkg embark")