emacs: tweak how the nerd icons are loaded

This commit is contained in:
Protesilaos Stavrou 2025-10-28 09:49:29 +02:00
parent 27f3626283
commit 641cc998d4
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 14 additions and 10 deletions

View file

@ -1,11 +1,12 @@
;;; Icons
(use-package nerd-icons
:ensure t)
:ensure t
:defer 1)
(use-package nerd-icons-completion
:ensure t
:if (display-graphic-p)
:after marginalia
:after (nerd-icons marginalia)
;; FIXME 2024-09-01: For some reason this stopped working because it
;; macroexpands to `marginalia-mode' instead of
;; `marginalia-mode-hook'. What is more puzzling is that this does
@ -23,27 +24,28 @@
(use-package nerd-icons-corfu
:ensure t
:if (display-graphic-p)
:after corfu
:after (nerd-icons corfu)
:config
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
(use-package nerd-icons-dired
:ensure t
:if (display-graphic-p)
:after nerd-icons
:hook
(dired-mode . nerd-icons-dired-mode))
(use-package nerd-icons-xref
:ensure t
:if (display-graphic-p)
:after xref
:after (nerd-icons xref)
:config
(nerd-icons-xref-mode 1))
(use-package nerd-icons-grep
:ensure t
:if (display-graphic-p)
:after grep
:after (nerd-icons grep)
:config
(when grep-use-headings
(nerd-icons-grep-mode 1)))

View file

@ -11621,12 +11621,13 @@ files. The user must handle this step by invoking the command
#+begin_src emacs-lisp :tangle "prot-emacs-modules/prot-emacs-icons.el" :mkdirp yes
;;; Icons
(use-package nerd-icons
:ensure t)
:ensure t
:defer 1)
(use-package nerd-icons-completion
:ensure t
:if (display-graphic-p)
:after marginalia
:after (nerd-icons marginalia)
;; FIXME 2024-09-01: For some reason this stopped working because it
;; macroexpands to `marginalia-mode' instead of
;; `marginalia-mode-hook'. What is more puzzling is that this does
@ -11644,27 +11645,28 @@ files. The user must handle this step by invoking the command
(use-package nerd-icons-corfu
:ensure t
:if (display-graphic-p)
:after corfu
:after (nerd-icons corfu)
:config
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
(use-package nerd-icons-dired
:ensure t
:if (display-graphic-p)
:after nerd-icons
:hook
(dired-mode . nerd-icons-dired-mode))
(use-package nerd-icons-xref
:ensure t
:if (display-graphic-p)
:after xref
:after (nerd-icons xref)
:config
(nerd-icons-xref-mode 1))
(use-package nerd-icons-grep
:ensure t
:if (display-graphic-p)
:after grep
:after (nerd-icons grep)
:config
(when grep-use-headings
(nerd-icons-grep-mode 1)))