[Emacs] Better web-mode config, cleaner prettier-js config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bfef9895d6
commit
81a3b67f63
@ -7251,6 +7251,12 @@ languages in the same buffer, mainly HTML, CSS, and Javascript.
|
|||||||
("\\.ctp\\'" . web-mode)
|
("\\.ctp\\'" . web-mode)
|
||||||
("\\.djhtml\\'" . web-mode)
|
("\\.djhtml\\'" . web-mode)
|
||||||
("\\.vue\\'" . web-mode))
|
("\\.vue\\'" . web-mode))
|
||||||
|
:config
|
||||||
|
(csetq web-mode-markup-indent-offset 2
|
||||||
|
web-mode-code-indent-offset 2
|
||||||
|
web-mode-css-indent-offset 2
|
||||||
|
web-mode-style-padding 0
|
||||||
|
web-mode-script-padding 0)
|
||||||
:general
|
:general
|
||||||
(phundrak/major-leader-key
|
(phundrak/major-leader-key
|
||||||
:keymaps 'web-mode-map
|
:keymaps 'web-mode-map
|
||||||
@ -7408,11 +7414,9 @@ And finally, here is a formatter for Javascript.
|
|||||||
(use-package prettier-js
|
(use-package prettier-js
|
||||||
:defer t
|
:defer t
|
||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:hook (rjsx-mode . prettier-js-mode)
|
:hook ((rjsx-mode web-mode) . prettier-js-mode)
|
||||||
:hook (web-mode . prettier-js-mode)
|
:config
|
||||||
:custom
|
(csetq prettier-js-args '("--single-quote" "--jsx-single-quote")))
|
||||||
(prettier-js-args '("--single-quote"
|
|
||||||
"--jsx-single-quote")))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
***** Typescript
|
***** Typescript
|
||||||
|
Loading…
Reference in New Issue
Block a user