built-in treesit config

This commit is contained in:
zedhugh committed 2023-01-28 23:42:15 +08:00
1 parent f533f73444
commit 57c3df2705
8 files changed
+28 -9

No files matched your search

+7 -3
View File
@@ -1,6 +1,12 @@
;; -*- coding: utf-8; lexical-binding: t; -*-
(unless (and (fboundp 'treesit-available-p) (treesit-available-p))
(if (bound-and-true-p creature/treesit-available)
(progn
(if (treesit-ready-p 'typescript)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)))
(if (treesit-ready-p 'tsx)
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))))
(add-subdirs-to-load-path (expand-file-name "optional-pkg" creature/config-dir))
(require 'typescript-mode)
@@ -22,6 +28,4 @@
(add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx))))
(provide 'init-typescript)