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: Yoav Marco
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Fri, 17 Jun 2022 21:12:22 +0300
User-agent: mu4e 1.6.3; emacs 29.0.50

Yuan Fu <casouri@gmail.com> writes:

>> On Jun 16, 2022, at 11:19 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> [...]
>> I mean, what should a user do, after
>> building the branch, to start using the features backed by
>> tree-sitter?  I presume the list should include downloading parsers
>> (any recommendations for the relevant sites?), compiling them (or
>> maybe there are sites with precompiled ones?), then setting some
>> variables or data structures in Emacs or invoking some commands/modes?
>>
>> I think something like that will be useful for more people to try the
>> branch, provide feedback, and facilitate making its more stable.
>
> I do have an article that covers many of the topics you mentioned [1]. But it
> lacks “hands-on” details, and it is a bit out-dated (repository moved, we
> changed the prefix, etc). I can update it with, say, a starter guide on
> implementing a minimal tree-sitter C major mode. I’ll post back once its done.
>
> [1]: https://archive.casouri.cat/note/2021/emacs-tree-sitter/index.html
>
> Yuan

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



reply via email to

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