diff --git a/config/emacs/emacs.org b/config/emacs/emacs.org index 57d53d1e..586e3ff9 100644 --- a/config/emacs/emacs.org +++ b/config/emacs/emacs.org @@ -912,10 +912,15 @@ this should be useful later #+end_src ** Typescript #+begin_src emacs-lisp -(use-package typescript-mode - :mode ("\\.ts\\'" - "\\.tsx\\'") - :hook (typescript-mode . eglot-ensure)) + (use-package typescript-ts-mode + :mode (("\\.ts\\'" . typescript-ts-mode) + ("\\.tsx\\'" . tsx-ts-mode)) + :config + (setq treesit-language-source-alist + '((typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src" nil nil) + (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src" nil nil))) + :hook ((typescript-mode . eglot-ensure) + (tsx-ts-mode . eglot-ensure)) #+end_src ** Astro #+begin_src emacs-lisp