From a5ea55766f7c09f9d105239c547029cf8c7405ad Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Wed, 4 Jan 2023 10:46:22 -0500 Subject: Improved file search, and tsx support --- lisp/web.el | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lisp/web.el') diff --git a/lisp/web.el b/lisp/web.el index eece1e0..c999e45 100644 --- a/lisp/web.el +++ b/lisp/web.el @@ -28,7 +28,20 @@ (push '("\\.js[x]?\\'" . javascript-mode) auto-mode-alist) ;; TypeScript -(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode)) +(use-package tree-sitter-langs + :config + (tree-sitter-require 'tsx) + (add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx)) + ) +(use-package typescript-mode + :mode "\.ts\'" + :config (setq typescript-indent-level 2) + :init + (define-derived-mode typescript-tsx-mode typescript-mode "TypeScript[tsx]") + (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode)) + ) + + (require 'flycheck) -- cgit v1.2.1