diff --git a/init.org b/init.org index d919b9e..6d61454 100644 --- a/init.org +++ b/init.org @@ -1131,7 +1131,7 @@ npm install -g prettier (use-package tide :ensure t :after (rjsx-mode company flycheck) - :hook (rjsx-mode . setup-tide-mode) +; :hook (rjsx-mode . setup-tide-mode) :config (defun setup-tide-mode () "Setup function for tide." @@ -1140,13 +1140,23 @@ npm install -g prettier (flycheck-mode t) (setq flycheck-check-synta-automatically '(save mode-enabled)) (tide-hl-identifier-mode t))) - + +(use-package add-node-modules-path + :ensure t + :defer t + :hook (flycheck-mode . add-node-modules-path)) + +;; needs npm install -g prettier (use-package prettier-js :ensure t :after (rjsx-mode) :defer t :diminish prettier-js-mode - :hook (((js2-mode rsjx-mode) . prettier-js-mode))) + :hook (((js2-mode rsjx-mode) . setup-prettier)) + :config + (defun setup-prettier () + (add-node-modules-path) + (prettier-js-mode))) #+end_src ** YAML