Add support for lsp for typescript.
This commit is contained in:
parent
e3a1e69fb5
commit
cfdbb50de0
@ -30,6 +30,13 @@
|
|||||||
("\\.tsx\\'" . tsx-ts-mode)
|
("\\.tsx\\'" . tsx-ts-mode)
|
||||||
)
|
)
|
||||||
:commands (tsx-ts-mode)
|
:commands (tsx-ts-mode)
|
||||||
|
:hook (
|
||||||
|
(tsx-ts-mode . (lambda ()
|
||||||
|
(when-linux
|
||||||
|
(eglot-ensure)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
)
|
||||||
:init
|
:init
|
||||||
(add-to-list 'treesit-language-source-alist '(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")))
|
(add-to-list 'treesit-language-source-alist '(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")))
|
||||||
(unless (treesit-ready-p 'tsx) (treesit-install-language-grammar 'tsx))
|
(unless (treesit-ready-p 'tsx) (treesit-install-language-grammar 'tsx))
|
||||||
@ -43,6 +50,13 @@
|
|||||||
("\\.ts\\'" . typescript-ts-mode)
|
("\\.ts\\'" . typescript-ts-mode)
|
||||||
)
|
)
|
||||||
:commands (typescript-ts-mode)
|
:commands (typescript-ts-mode)
|
||||||
|
:hook (
|
||||||
|
(typescript-ts-mode . (lambda ()
|
||||||
|
(when-linux
|
||||||
|
(eglot-ensure)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
)
|
||||||
:init
|
:init
|
||||||
(add-to-list 'treesit-language-source-alist '(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")))
|
(add-to-list 'treesit-language-source-alist '(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")))
|
||||||
(unless (treesit-ready-p 'typescript) (treesit-install-language-grammar 'typescript))
|
(unless (treesit-ready-p 'typescript) (treesit-install-language-grammar 'typescript))
|
||||||
|
@ -5,4 +5,5 @@
|
|||||||
- prettier # typescript+yaml formatting
|
- prettier # typescript+yaml formatting
|
||||||
- pyright
|
- pyright
|
||||||
- gopls
|
- gopls
|
||||||
|
- typescript-language-server
|
||||||
state: present
|
state: present
|
||||||
|
Loading…
x
Reference in New Issue
Block a user