I added that theme to my
init file, and tried making it the default theme. I use
use-package, and configured the theme as follows:
(use-package spacemacs-theme :ensure t :config (load-theme 'spacemacs-light t) )
When re-evaluating my
init file, the theme didn’t load. I tried to run only the
(load-theme 'spacemacs-light t) line, and the theme loaded. I changed the
:init in the package configuration, and it loaded when I re-loaded emacs.
What, then, is the difference between
The answer to that question, which I found it in this stack-overflow answer, is that in
use-package, whatever defined inside the
:init keyword, will load whenever emacs is loading. What’s in the
:config, though, will be executed only when the package is actually loaded (i.e lazy loading)2.
Here’s how my configuration for that theme looks like now:
(use-package spacemacs-theme :ensure t :init (load-theme 'spacemacs-light t) )