emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree-sitter integration on feature/tree-sitter


From: Yuan Fu
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Fri, 17 Jun 2022 17:35:50 -0700

> 
> That reminds me -- Yuan, have you seen my PR to tree-sitter-langs, Hacky
> support for treesit in Emacs core [2]?
> 
> It uses tree-sitter-langs' groundwork for fetching grammars and
> packaging highlighting queries, but uses treesit instead of the
> tree-sitter dynamic module.
> 
> Enabling highlighting is just M-x treesit-langs-hl-mode in major-modes
> that tree-sitter-langs supports.
> 
> [2]: https://github.com/emacs-tree-sitter/tree-sitter-langs/pull/99

Ah yes, I’ve seen it. I think the part that automatically downloads and builds 
language definitions is very useful. It cannot be in Emacs core because we 
cannot distribute language definitions, but it could be a very useful ELPA or 
MELPA package. The part that automatically generate highlighting is also 
useful, but I’m not sure how would we use it. We probably don’t want to add a 
tree-sitterify-mode that just enables tree-sitter highlight in a mode—I prefer 
that we change each major mode to use tree-sitter features.

Also I think it makes more sense if you just fork it rather than making a PR.

Yuan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]