How to reload a custom color theme to pick up changes? #99
-
|
I'm modifying a custom color theme, using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
EDIT: The fix is up: doomemacs/core@1aabae7 Turns out there is a bug in ;;; add to $DOOMDIR/config.el
(defadvice! fixed-doom/reload-theme ()
:override #'doom/reload-theme
(interactive)
(let* ((themes (copy-sequence custom-enabled-themes))
(real-themes (cl-remove-if-not #'doom--theme-is-colorscheme-p themes)))
(mapc #'disable-theme themes)
(dolist (th (reverse themes))
(if (locate-file (concat (symbol-name th) "-theme.el")
(custom-theme--load-path)
'("" "c"))
(load-theme th t)
(enable-theme th)))
(doom/reload-font)
(message "%s %s"
(propertize
(format "Reloaded %d theme%s:"
(length real-themes)
(if (cdr real-themes) "s" ""))
'face 'bold)
(mapconcat #'prin1-to-string real-themes ", "))))Otherwise, some ways that seem to get around the issue are:
|
Beta Was this translation helpful? Give feedback.
EDIT: The fix is up: doomemacs/core@1aabae7
Turns out there is a bug in
doom/reloadwhere it doesn't re-evaluate the theme's source file, in case of changes. I'll push a fix for that soon, but in the meantime you can fix it locally with: