From fb5c087ea7f06d874ccb705b8ebe1100888576ad Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 15 Feb 2019 14:25:01 -0500 Subject: [PATCH] Use web-mode for javascript/jsx --- emacs/init.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/emacs/init.org b/emacs/init.org index 927efc3..af2982a 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -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