Configure emmet-mode for typescript-tsx-mode

This commit is contained in:
Seong Yong-ju 2019-05-11 11:35:19 +09:00 committed by duianto
parent 1e00461dd8
commit 59504029b1
3 changed files with 12 additions and 0 deletions

View File

@ -2391,6 +2391,7 @@ Other:
- Fixed jump handling with multiple backends (thanks to Aaron Jensen)
- Fixed =typescript/jump-to-type-def= for npm modules (thanks to Jam Risser)
- Added the same setup to tsx files as to ts files (thanks to Trapez Breen)
- Configured =emmet-mode= for =typescript-tsx-mode=
**** Vagrant
- Key bindings:
- move key bindings prefix to ~SPC a V~ (thanks to Thomas de Beauchêne)

View File

@ -84,6 +84,13 @@
"Setup eldoc for LSP."
(eldoc-mode))
;; Emmet
(defun spacemacs/typescript-emmet-mode ()
"Configure `emmet-mode' for local buffer."
(setq-local emmet-expand-jsx-className? t))
;; Others

View File

@ -14,6 +14,7 @@
add-node-modules-path
company
eldoc
emmet-mode
flycheck
smartparens
tide
@ -37,6 +38,9 @@
'(typescript-mode-local-vars-hook
typescript-tsx-mode-local-vars-hook) t))
(defun typescript/post-init-emmet-mode ()
(add-hook 'typescript-tsx-mode-hook #'spacemacs/typescript-emmet-mode))
(defun typescript/post-init-flycheck ()
(spacemacs/enable-flycheck 'typescript-mode)
(spacemacs/enable-flycheck 'typescript-tsx-mode)