fix(javascript): tsx-ts-mode config & lsp activation

Because the `tsx-ts-mode` major mode is housed in the
`typescript-ts-mode` package (there is no `tsx-ts-mode` package).

Fix: #8478
This commit is contained in:
Henrik Lissner
2025-09-01 17:51:05 +02:00
parent bb18611177
commit 8760979fb5

View File

@@ -77,25 +77,18 @@
(use-package! typescript-ts-mode ; 29.1+ only (use-package! typescript-ts-mode ; 29.1+ only
:when (modulep! +tree-sitter) :when (modulep! +tree-sitter)
:mode "\\.ts\\'" :mode "\\.ts\\'"
:mode ("\\.[tj]sx\\'" . tsx-ts-mode)
:init :init
(set-tree-sitter! 'typescript-mode 'typescript-ts-mode (set-tree-sitter! 'typescript-mode 'typescript-ts-mode
'((typescript :url "https://github.com/tree-sitter/tree-sitter-typescript" '((typescript :url "https://github.com/tree-sitter/tree-sitter-typescript"
:commit "8e13e1db35b941fc57f2bd2dd4628180448c17d5" :commit "8e13e1db35b941fc57f2bd2dd4628180448c17d5"
:source-dir "typescript/src"))) :source-dir "typescript/src")))
:config
(+javascript-common-config 'typescript-ts-mode))
(use-package! tsx-ts-mode ; 29.1+ only
:when (modulep! +tree-sitter)
:mode "\\.[tj]sx\\'"
:defer t
:init
(set-tree-sitter! nil 'tsx-ts-mode (set-tree-sitter! nil 'tsx-ts-mode
'((tsx :url "https://github.com/tree-sitter/tree-sitter-typescript" '((tsx :url "https://github.com/tree-sitter/tree-sitter-typescript"
:commit "8e13e1db35b941fc57f2bd2dd4628180448c17d5" :commit "8e13e1db35b941fc57f2bd2dd4628180448c17d5"
:source-dir "tsx/src"))) :source-dir "tsx/src")))
:config :config
(+javascript-common-config 'typescript-ts-mode)
(+javascript-common-config 'tsx-ts-mode)) (+javascript-common-config 'tsx-ts-mode))