Use web-mode for javascript/jsx

This commit is contained in:
Jeremy Dormitzer 2019-02-15 14:25:01 -05:00
parent dfc3f2b988
commit fb5c087ea7

View File

@ -947,6 +947,18 @@ Some formatting stuff:
(setq js-indent-level 4)
#+END_SRC
#+BEGIN_SRC emacs-lisp
(use-package web-mode
:mode (("\\.html\\'" . web-mode)
("\\.js\\'" . web-mode)
("\\.jsx\\'" . web-mode))
:config
(add-hook 'web-mode-hook
(lambda ()
(when (equal web-mode-content-type "javascript")
(web-mode-set-content-type "jsx")))))
#+END_SRC
Use nvm to manage node versions:
#+BEGIN_SRC emacs-lisp
(use-package nvm