fix(typescript) fix ts init process with .tsx files (#15885)
fixes https://github.com/syl20bnr/spacemacs/issues/15217 fixes https://github.com/syl20bnr/spacemacs/issues/15412
This commit is contained in:
parent
f51fab4baa
commit
43d76ebe42
|
@ -101,7 +101,6 @@
|
||||||
(defun typescript/post-init-web-mode ()
|
(defun typescript/post-init-web-mode ()
|
||||||
(define-derived-mode typescript-tsx-mode web-mode "TypeScript-tsx")
|
(define-derived-mode typescript-tsx-mode web-mode "TypeScript-tsx")
|
||||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode))
|
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode))
|
||||||
(spacemacs/typescript-mode-init 'typescript-tsx-mode-local-vars-hook)
|
|
||||||
(spacemacs/typescript-mode-config 'typescript-tsx-mode))
|
(spacemacs/typescript-mode-config 'typescript-tsx-mode))
|
||||||
|
|
||||||
(defun typescript/init-typescript-mode ()
|
(defun typescript/init-typescript-mode ()
|
||||||
|
@ -110,7 +109,9 @@
|
||||||
:init
|
:init
|
||||||
(progn
|
(progn
|
||||||
(spacemacs/typescript-safe-local-variables '(lsp tide))
|
(spacemacs/typescript-safe-local-variables '(lsp tide))
|
||||||
(spacemacs/typescript-mode-init 'typescript-mode-local-vars-hook))
|
(spacemacs/typescript-mode-init 'typescript-mode-local-vars-hook)
|
||||||
|
;; init tsx locals here to get proper order
|
||||||
|
(spacemacs/typescript-mode-init 'typescript-tsx-mode-local-vars-hook))
|
||||||
:config (spacemacs/typescript-mode-config 'typescript-mode)))
|
:config (spacemacs/typescript-mode-config 'typescript-mode)))
|
||||||
|
|
||||||
(defun typescript/pre-init-import-js ()
|
(defun typescript/pre-init-import-js ()
|
||||||
|
|
Loading…
Reference in New Issue