Add support for lsp for typescript.
This commit is contained in:
parent
e3a1e69fb5
commit
cfdbb50de0
@ -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))
|
||||
|
@ -5,4 +5,5 @@
|
||||
- prettier # typescript+yaml formatting
|
||||
- pyright
|
||||
- gopls
|
||||
- typescript-language-server
|
||||
state: present
|
||||
|
Loading…
Reference in New Issue
Block a user