update external tree-sitter config
This commit is contained in:
1 file changed
+7
-6
@@ -1,11 +1,12 @@
|
||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
(if (bound-and-true-p creature/treesit-available)
|
||||
(when creature/treesit-available
|
||||
(let ((ts-enable (treesit-ready-p 'typescript))
|
||||
(tsx-enable (treesit-ready-p 'tsx)))
|
||||
(if (and ts-enable tsx-enable)
|
||||
(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-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
|
||||
(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)
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
(with-eval-after-load 'tree-sitter-langs
|
||||
(tree-sitter-require 'tsx)
|
||||
(add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx))))
|
||||
(add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx))))))
|
||||
|
||||
|
||||
(defun creature/treesit-convert-to-template ()
|
||||
|
||||
Reference in new issue
Block a user