mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-04 15:03:42 -05:00
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:
@@ -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))
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user