.emacs.d

My Emacs configuration files.
Log | Files | Refs | README

commit f3571d342f640690ddd1f7d39f906f805edc275d
parent 923863b7f68255ba2c3cb1e3dd85c12f26f8e0b2
Author: Hugo Soucy <hugo.soucy@equisoft.com>
Date:   Mon, 15 Apr 2019 15:13:44 -0400

Add rjsx mode

Diffstat:
Mpartials/webdev.el | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/partials/webdev.el b/partials/webdev.el @@ -9,10 +9,17 @@ (add-hook 'js2-mode-hook #'js2-imenu-extras-mode) (add-hook 'js2-mode-hook #'js2-refactor-mode)) -(use-package js2-refactor - ;; A JavaScript refactoring library for emacs. +;; (use-package js2-refactor +;; ;; A JavaScript refactoring library for emacs. +;; :ensure t +;; :pin melpa) + +(use-package rjsx-mode + ;; Real support for JSX :ensure t - :pin melpa) + :pin melpa + :config + (add-to-list 'auto-mode-alist '("components\\/.*\\.js\\'" . rjsx-mode))) (use-package web-mode ;; major mode for editing web templates. @@ -36,7 +43,7 @@ (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.etlua\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.twig\\'" . web-mode)) - (add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode)) + ;; (add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode)) (defadvice web-mode-highlight-part (around tweak-jsx activate) (if (equal web-mode-content-type "jsx") (let ((web-mode-enable-part-face nil))