Automatically enable prettier when .prettierrc is present at git root
This commit is contained in:
parent
dd118646d1
commit
fc32bfa4bf
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user