From 7d3406378fbc9f56e132ce55a55df9741c6e6cc8 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 12 Jul 2024 18:54:00 -0700 Subject: [PATCH] Temp fix a nerd-icons-completion bug --- init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.el b/init.el index 1212535..a0d25b4 100644 --- a/init.el +++ b/init.el @@ -1421,6 +1421,17 @@ buffers `helpful--sym' to `my/helpful-symbol-history'." (use-package nerd-icons) (use-package nerd-icons-completion :config + ;; Temp. fix rainstormstudio/nerd-icons-completion#11 + (define-minor-mode nerd-icons-completion-mode + "Add icons to completion candidates." + :global t + (if nerd-icons-completion-mode + (progn + (advice-add #'completion-metadata-get :around #'nerd-icons-completion-completion-metadata-get) + (advice-add (compat-function completion-metadata-get) :around #'nerd-icons-completion-completion-metadata-get)) + (progn + (advice-remove #'completion-metadata-get #'nerd-icons-completion-completion-metadata-get) + (advice-remove (compat-function completion-metadata-get) #'nerd-icons-completion-completion-metadata-get)))) (nerd-icons-completion-mode)) (use-package nerd-icons-dired :hook (dired-mode . nerd-icons-dired-mode))