mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
As typescript-mode has effectively been deprecated, let's switch to the new typescript-ts-mode in Emacs 29.x.
21 lines
554 B
EmacsLisp
21 lines
554 B
EmacsLisp
;;; siren-treesit.el --- jimeh's Emacs Siren: treesit
|
|
|
|
;;; Commentary:
|
|
|
|
;; Configuration for treesit
|
|
|
|
;;; Code:
|
|
|
|
(require 'treesit)
|
|
|
|
(defun siren-treesit-prepare (mode source)
|
|
"Setup treesit for MODE with SOURCE."
|
|
(add-to-list 'treesit-language-source-alist source)
|
|
(let ((lang (car source)))
|
|
(advice-add mode :before `(lambda (&rest _)
|
|
(when (not (treesit-ready-p ',lang))
|
|
(treesit-install-language-grammar ',lang))))))
|
|
|
|
(provide 'siren-treesit)
|
|
;;; siren-treesit.el ends here
|