From 2c4e6cc06010c917cfa9450dd1d459486a7d60a0 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sat, 20 Sep 2025 16:18:30 -0700 Subject: [PATCH] [doom] Auto install nerd-icons fonts --- home/modules/emacs/doom/config.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/modules/emacs/doom/config.el b/home/modules/emacs/doom/config.el index c71e8ad..7d8528e 100644 --- a/home/modules/emacs/doom/config.el +++ b/home/modules/emacs/doom/config.el @@ -30,6 +30,16 @@ ;; wasn't installed correctly. Font issues are rarely Doom issues! (setq doom-font (font-spec :family "Fira Code")) +;; Auto-install nerd-icons fonts if they're missing +(defun my/ensure-nerd-icons-fonts () + "Check if nerd-icons fonts are installed and install them if missing." + (when (display-graphic-p) + (unless (find-font (font-spec :name "Symbols Nerd Font Mono")) + (when (fboundp 'nerd-icons-install-fonts) + (nerd-icons-install-fonts t))))) + +(add-hook 'doom-init-ui-hook #'my/ensure-nerd-icons-fonts) + ;; There are two ways to load a theme. Both assume the theme is installed and ;; available. You can either set `doom-theme' or manually load a theme with the ;; `load-theme' function. This is the default: