Add support for lsp for typescript.

This commit is contained in:
Tom Alexander 2023-05-27 19:25:30 -04:00
parent e3a1e69fb5
commit cfdbb50de0
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 15 additions and 0 deletions

View File

@ -30,6 +30,13 @@
("\\.tsx\\'" . tsx-ts-mode)
)
:commands (tsx-ts-mode)
:hook (
(tsx-ts-mode . (lambda ()
(when-linux
(eglot-ensure)
)
))
)
:init
(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))
@ -43,6 +50,13 @@
("\\.ts\\'" . typescript-ts-mode)
)
:commands (typescript-ts-mode)
:hook (
(typescript-ts-mode . (lambda ()
(when-linux
(eglot-ensure)
)
))
)
:init
(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))

View File

@ -5,4 +5,5 @@
- prettier # typescript+yaml formatting
- pyright
- gopls
- typescript-language-server
state: present