From 053df601845b618847d56f837b9e33c4b52fcdca Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 4 Jan 2016 14:35:31 +0100 Subject: Emacs: Use web-mode for jsx files --- tag-emacs/emacs.d/init.org | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'tag-emacs/emacs.d') diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index a35e5989..0a4a3ec3 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -2039,18 +2039,19 @@ is really nice, because it handles the HTML part the same way in all of them as well. #+BEGIN_SRC emacs-lisp -(use-package web-mode - :mode (("/views/.*\\.php\\'" . web-mode) - ("/layouts/.*\\.html\\'" . web-mode) - ("/templates/.*\\.php\\'" . web-mode) - ("\\.ejs\\'" . web-mode)) - :config (setq web-mode-code-indent-offset 4 - web-mode-css-indent-offset 4 - web-mode-markup-indent-offset 4 - web-mode-style-padding 0 - web-mode-script-padding 0 - web-mode-comment-style 2 - web-mode-enable-auto-pairing nil)) + (use-package web-mode + :mode (("/views/.*\\.php\\'" . web-mode) + ("/layouts/.*\\.html\\'" . web-mode) + ("/templates/.*\\.php\\'" . web-mode) + ("\\.ejs\\'" . web-mode) + ("\\.jsx\\'" . web-mode)) + :config (setq web-mode-code-indent-offset 4 + web-mode-css-indent-offset 4 + web-mode-markup-indent-offset 4 + web-mode-style-padding 0 + web-mode-script-padding 0 + web-mode-comment-style 2 + web-mode-enable-auto-pairing nil)) #+END_SRC I derived a mode for twig, in order to use its =mode-hook=. -- cgit 1.4.1