From ec2179069f63063d42373acfab679d73f8d059aa Mon Sep 17 00:00:00 2001 From: eriedaberrie Date: Thu, 10 Oct 2024 23:14:03 -0700 Subject: [PATCH] Temporary fix to all-the-icons-completion with marginalia --- init.el | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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)