I'm using use-package
and I want my fill-column
to be set to 100
for files edited with js2-mode
.
I tried to do so in the :config
part, like:
(use-package js2-mode
:config
(setq fill-column 100))
(among other configuration) but it didn't work, fill-column
was still 70
after loading a JS file (which activated js2-mode
).
The way I made it work was by setting fill-column
inside a hook like:
(use-package js2-mode
:preface
(defun me/js2-hook ()
(setq fill-column 100))
:config
(add-hook 'js2-mode-hook #'me/js2-hook))
So, my question is, what was wrong with setting fill-column
straight into :config
? Why is the hook required?
Thanks!