diff --git a/layers/+frameworks/react/funcs.el b/layers/+frameworks/react/funcs.el index 25072171a..ed1bf77fb 100644 --- a/layers/+frameworks/react/funcs.el +++ b/layers/+frameworks/react/funcs.el @@ -49,6 +49,12 @@ (message "`lsp' layer is not installed, please add `lsp' layer to your dofile."))) +;; Emmet +(defun spacemacs/react-emmet-mode () + "Activate `emmet-mode' and configure it for local buffer." + (emmet-mode) + (setq-local emmet-expand-jsx-className? t)) + ;; Others (defun inside-string-q () "Returns non-nil if inside string, else nil. diff --git a/layers/+frameworks/react/packages.el b/layers/+frameworks/react/packages.el index 3df65fb2c..387a07ab3 100644 --- a/layers/+frameworks/react/packages.el +++ b/layers/+frameworks/react/packages.el @@ -30,7 +30,7 @@ (add-hook 'rjsx-mode-local-vars-hook #'spacemacs//react-setup-company)) (defun react/post-init-emmet-mode () - (add-hook 'rjsx-mode-hook 'emmet-mode)) + (add-hook 'rjsx-mode-hook 'spacemacs/react-emmet-mode)) (defun react/post-init-evil-matchit () (with-eval-after-load 'evil-matchit