Skip to content

Commit

Permalink
use js2-jsx-mode instead of web-mode for JSX
Browse files Browse the repository at this point in the history
  • Loading branch information
L42y committed Oct 10, 2016
1 parent 5f9d03b commit a1f2252
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lisp/progmodes.el
Expand Up @@ -36,7 +36,8 @@

(use-package js2-mode
:ensure t
:mode "\\.js$"
:mode (("\\.js$" . js2-mode)
("/\\([[:upper:]]\\w+\\)\\(/index\\)?\\.js$" . js2-jsx-mode))
:config (progn
(setq-default js2-basic-offset 2)
(setq js2-include-node-externs t)
Expand Down Expand Up @@ -88,7 +89,7 @@

(use-package web-mode
:ensure t
:mode ("\\.html$" "\\.json$" "/\\([[:upper:]]\\w+\\)\\(/index\\)?\\.js$")
:mode ("\\.html$" "\\.json$")
:config (progn
(setq web-mode-content-types-alist
'(("jsx" . "/\\([[:upper:]]\\w+\\)\\(/index\\)?\\.js$"))
Expand Down

0 comments on commit a1f2252

Please sign in to comment.