diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4819a2f..c8b2414 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -898,6 +898,14 @@ :config (company-auctex-init)) +(use-package prettier-js + :hook ((js2-mode typescript-mode web-mode) . prettier-js-mode-maybe) + :init + (defun prettier-js-mode-maybe () + (interactive) + (when (file-exists-p (concat (magit-toplevel) ".prettierrc")) + (prettier-js-mode t)))) + ;;; Local Variables (add-to-list 'safe-local-eval-forms '(outline-hide-body)) ;; Local Variables: