feat(vertico): improve marginalia annotations

- use `doom-project-root` in the annotation category
  `project-file` (marginalia uses `project.el`)
- annotate more functions, alphabetize list
This commit is contained in:
Itai Y. Efrat 2021-07-31 10:46:00 +03:00
parent b7901231d4
commit 859fc4e1b1

View file

@ -173,11 +173,19 @@ overrides `completion-styles' during company completion sessions.")
:config :config
(when (featurep! +icons) (when (featurep! +icons)
(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup)) (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup))
(advice-add #'marginalia--project-root :override #'doom-project-root)
(pushnew! marginalia-command-categories (pushnew! marginalia-command-categories
'(+default/find-file-under-here. file)
'(doom/find-file-in-emacsd . project-file)
'(doom/find-file-in-other-project . project-file)
'(doom/find-file-in-private-config . file)
'(doom/describe-active-minor-mode . minor-mode)
'(flycheck-error-list-set-filter . builtin)
'(persp-switch-to-buffer . buffer) '(persp-switch-to-buffer . buffer)
'(projectile-find-file . project-file) '(projectile-find-file . project-file)
'(doom/describe-active-minor-mode . minor-mode) '(projectile-recentf . project-file)
'(flycheck-error-list-set-filter . builtin))) '(projectile-switch-to-buffer . buffer)
'(projectile-switch-project . project-file)))
(use-package! embark-consult (use-package! embark-consult