[Emacs] Actually enable prettier-js-mode by default in web-mode
This is how the previously reverted commit was meant to go.
This commit is contained in:
parent
78ae3da3b1
commit
d7af354c40
@ -7322,7 +7322,8 @@ languages in the same buffer, mainly HTML, CSS, and Javascript.
|
|||||||
(use-package web-mode
|
(use-package web-mode
|
||||||
:defer t
|
:defer t
|
||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:hook ((html-mode . web-mode))
|
:hook html-mode
|
||||||
|
:hook (web-mode . prettier-js-mode)
|
||||||
:mode (("\\.phtml\\'" . web-mode)
|
:mode (("\\.phtml\\'" . web-mode)
|
||||||
("\\.tpl\\.php\\'" . web-mode)
|
("\\.tpl\\.php\\'" . web-mode)
|
||||||
("\\.twig\\'" . web-mode)
|
("\\.twig\\'" . web-mode)
|
||||||
@ -7507,7 +7508,7 @@ And finally, here is a formatter for Javascript.
|
|||||||
:defer t
|
:defer t
|
||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:after (rjsx-mode web-mode typescript-mode)
|
:after (rjsx-mode web-mode typescript-mode)
|
||||||
:hook ((rjsx-mode web-mode typescript-mode) . prettier-js-mode)
|
:hook ((rjsx-mode typescript-mode) . prettier-js-mode)
|
||||||
:config
|
:config
|
||||||
(csetq prettier-js-args '("--single-quote" "--jsx-single-quote")))
|
(csetq prettier-js-args '("--single-quote" "--jsx-single-quote")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user