From 405ba466460f9d987d331e64fe28eaba481b9c62 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 19 Jun 2017 10:25:31 +0200 Subject: Emacs: Install rjsx-mode for React component files --- emacs/.emacs.d/init.org | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 5c44022..1570206 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2099,8 +2099,7 @@ an AST internally, so it can work with it almost like a lisp. #+BEGIN_SRC emacs-lisp (use-package js2-mode - :mode (("\\.js\\'" . js2-mode) - ("\\.jsx\\'" . js2-jsx-mode)) + :mode (("\\.js\\'" . js2-mode)) :interpreter ("node" . js2-mode) :functions js2-next-error :config (progn @@ -2124,6 +2123,15 @@ an AST internally, so it can work with it almost like a lisp. js2-strict-missing-semi-warning nil))) #+END_SRC +**** rjsx-mode + +A set of advice for js2-jsx-mode to work better with React. + +#+BEGIN_SRC emacs-lisp +(use-package rjsx-mode + :mode (("\\.jsx\\'" . rjsx-mode))) +#+END_SRC + **** js2-refactor Thanks to the AST provided by js2-mode, refactoring is possible. This -- cgit 1.4.1