react: improved react file recognition

This commit is contained in:
panjan 2016-09-04 00:20:58 +02:00 committed by Eivind Fonn
parent 9a14373845
commit 12f823ba3c

View file

@ -65,5 +65,5 @@
(add-to-list 'auto-mode-alist '("\\index.android.js\\'" . react-mode))
(add-to-list 'auto-mode-alist '("\\index.ios.js\\'" . react-mode))
(add-to-list 'magic-mode-alist '("/\\*\\* @jsx React\\.DOM \\*/" . react-mode))
(add-to-list 'magic-mode-alist '("^import React" . react-mode))
(add-to-list 'magic-mode-alist '("import\s+[^\s]+\s+from\s+['\"]react['\"]" . react-mode))
(add-hook 'react-mode-hook 'spacemacs//setup-react-mode))