diff --git a/init.el b/init.el index 17b0207..37ea8fc 100644 --- a/init.el +++ b/init.el @@ -348,7 +348,6 @@ (completion-category-overrides '((file (styles basic partial-completion))))) (use-package marginalia - :after vertico :demand t :bind (:map minibuffer-local-map ("M-a" . marginalia-cycle)) :config @@ -380,13 +379,21 @@ (use-package cape) -(use-package all-the-icons - :demand t) - +(use-package all-the-icons) (use-package all-the-icons-completion - :after marginalia all-the-icons + :demand t :hook (marginalia-mode . all-the-icons-completion-marginalia-setup) - :init + :config + (require 'marginalia) + ;; NOTE: https://github.com/iyefrat/all-the-icons-completion/pull/33 + (add-hook 'all-the-icons-completion-mode-hook + (lambda () + (if all-the-icons-completion-mode + (advice-add (compat-function completion-metadata-get) + :around + #'all-the-icons-completion-completion-metadata-get) + (advice-remove (compat-function completion-metadata-get) + #'all-the-icons-completion-completion-metadata-get)))) (all-the-icons-completion-mode)) (use-package treemacs)