Skip to content

Commit

Permalink
fix(typescript) fix ts init process with .tsx files (syl20bnr#15885)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrsp authored and lebensterben committed Jan 13, 2023
1 parent c958ca5 commit d9457ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layers/+lang/typescript/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
(defun typescript/post-init-web-mode ()
(define-derived-mode typescript-tsx-mode web-mode "TypeScript-tsx")
(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))

(defun typescript/init-typescript-mode ()
Expand All @@ -110,7 +109,9 @@
:init
(progn
(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)))

(defun typescript/pre-init-import-js ()
Expand Down

0 comments on commit d9457ca

Please sign in to comment.