2017-01-02 03:45:23 +00:00
|
|
|
|
;;; funcs.el --- React Layer functions File for Spacemacs
|
|
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
2017-01-02 03:45:23 +00:00
|
|
|
|
;;
|
|
|
|
|
;; Author: Muneeb Shaikh <muneeb@reversehack.in>
|
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
|
;;
|
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
|
;;
|
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; react mode
|
|
|
|
|
|
|
|
|
|
(defun spacemacs//setup-react-mode ()
|
|
|
|
|
"Adjust web-mode to accommodate react-mode"
|
|
|
|
|
(emmet-mode 0)
|
|
|
|
|
;; See https://github.com/CestDiego/emmet-mode/commit/3f2904196e856d31b9c95794d2682c4c7365db23
|
|
|
|
|
(setq-local emmet-expand-jsx-className? t)
|
|
|
|
|
;; Enable js-mode snippets
|
|
|
|
|
(yas-activate-extra-mode 'js-mode)
|
|
|
|
|
;; Force jsx content type
|
|
|
|
|
(web-mode-set-content-type "jsx")
|
|
|
|
|
;; Don't auto-quote attribute values
|
2017-10-25 09:20:53 +00:00
|
|
|
|
(setq-local web-mode-enable-auto-quoting nil)
|
|
|
|
|
;; See https://github.com/syl20bnr/spacemacs/issues/8222
|
|
|
|
|
(set (make-local-variable 'company-minimum-prefix-length) 2))
|