[Emacs] Better web dev options
Improve keybindings for Emmet Auto-enable web-mode for Vue files Prefer single quotes in Javascript and Typescript
This commit is contained in:
parent
f7af204479
commit
9215d8dd1e
@ -7178,7 +7178,14 @@ hand.
|
|||||||
:config
|
:config
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:keymaps 'emmet-mode-keymap
|
:keymaps 'emmet-mode-keymap
|
||||||
"C-RET" #'emmet-expand-yas))
|
"M-RET" #'emmet-expand-yas)
|
||||||
|
(phundrak/major-leader-key
|
||||||
|
:keymaps 'web-mode-map
|
||||||
|
:packages '(web-mode emmet-mode)
|
||||||
|
"e" '(:ignore t :which-key "emmet")
|
||||||
|
"ee" #'emmet-expand-line
|
||||||
|
"ep" #'emmet-preview
|
||||||
|
"ew" #'emmet-wrap-with-markup))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Impatient mode serves web buffers live over HTTP so you can see your
|
Impatient mode serves web buffers live over HTTP so you can see your
|
||||||
@ -7213,7 +7220,8 @@ languages in the same buffer, mainly HTML, CSS, and Javascript.
|
|||||||
("\\.ejs\\'" . web-mode)
|
("\\.ejs\\'" . web-mode)
|
||||||
("\\.svelte\\'" . web-mode)
|
("\\.svelte\\'" . web-mode)
|
||||||
("\\.ctp\\'" . web-mode)
|
("\\.ctp\\'" . web-mode)
|
||||||
("\\.djhtml\\'" . web-mode))
|
("\\.djhtml\\'" . web-mode)
|
||||||
|
("\\.vue\\'" . web-mode))
|
||||||
:general
|
:general
|
||||||
(phundrak/major-leader-key
|
(phundrak/major-leader-key
|
||||||
:keymaps 'web-mode-map
|
:keymaps 'web-mode-map
|
||||||
@ -7366,7 +7374,10 @@ 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 . prettier-js-mode)
|
||||||
|
:custom
|
||||||
|
(prettier-js-args '("--single-quote"
|
||||||
|
"--jsx-single-quote")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
***** Typescript
|
***** Typescript
|
||||||
|
Loading…
Reference in New Issue
Block a user