Add new marginalia categories

This commit is contained in:
Kiana Sheibani 2024-02-27 15:22:26 -05:00
parent a1691c2d2a
commit 1934c157f2
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -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)) (setq eldoc-documentation-strategy 'eldoc-documentation-compose))
#+end_src #+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\\>" . workspace)
'("\\<projects?\\>" . 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 ** Embark
#+call: confpkg("!Pkg embark") #+call: confpkg("!Pkg embark")