[doom] Auto install nerd-icons fonts
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user