diff options
author | Matthew Kosarek <matthew.kosarek@vention.cc> | 2023-01-04 10:46:22 -0500 |
---|---|---|
committer | Matthew Kosarek <matthew.kosarek@vention.cc> | 2023-01-04 10:46:22 -0500 |
commit | a5ea55766f7c09f9d105239c547029cf8c7405ad (patch) | |
tree | 789b84af4604d1c827d4edda03cab934e46240db /lisp/web.el | |
parent | 6147c614415231543619577dc8c3f666824a4da7 (diff) |
Improved file search, and tsx support
Diffstat (limited to 'lisp/web.el')
-rw-r--r-- | lisp/web.el | 15 |
1 files changed, 14 insertions, 1 deletions
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) |