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: