Temporary fix to all-the-icons-completion with marginalia

This commit is contained in:
eriedaberrie 2024-10-10 23:14:03 -07:00
parent 5d969593c7
commit ec2179069f

19
init.el
View file

@ -348,7 +348,6 @@
(completion-category-overrides '((file (styles basic partial-completion))))) (completion-category-overrides '((file (styles basic partial-completion)))))
(use-package marginalia (use-package marginalia
:after vertico
:demand t :demand t
:bind (:map minibuffer-local-map ("M-a" . marginalia-cycle)) :bind (:map minibuffer-local-map ("M-a" . marginalia-cycle))
:config :config
@ -380,13 +379,21 @@
(use-package cape) (use-package cape)
(use-package all-the-icons (use-package all-the-icons)
:demand t)
(use-package all-the-icons-completion (use-package all-the-icons-completion
:after marginalia all-the-icons :demand t
:hook (marginalia-mode . all-the-icons-completion-marginalia-setup) :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)) (all-the-icons-completion-mode))
(use-package treemacs) (use-package treemacs)