I have added a
(add-hook 'js2-mode-hook 'my-js2-mode-setup) the following hook to a use-package
(use-package js2-mode :ensure t :interpreter (("node" . js2-mode)) :mode "\\.\\(js\\|json\\)$" :bind (:map js2-mode-map ("C-c C-p" . js2-print-json-path)) :init (add-hook 'js2-mode-hook 'my-js2-mode-setup) (add-hook 'js-mode-hook 'js2-minor-mode) (setq js2-highlight-level 3 js2-mode-show-parse-errors nil js2-mode-show-strict-warnings nil))
I was not convinced the hook was running so I removed the
my-js2-mode-set-up function and no error has occurred.
Why is this? Should I have the
init section enclosed in a
progn as there is more than one statement?