emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Daniel Martín
Subject: Re: Tree-sitter api
Date: Sat, 18 Dec 2021 14:39:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)

Yuan Fu <casouri@gmail.com> writes:

> It’s been a while and no one provided further comments on the indent
> and font-lock integration of tree-sitter, so I finished the manuals
> for indent and font-lock integration. They are under 24.6 Font Lock
> Mode and 24.7 Automatic Indentation of code. Once the author of
> tree-sitter allow tree-sitter to change malloc implementation at
> runtime, tree-sitter integration will be ready. (Though I suspect that
> won’t come soon. The author is still actively developing tree-sitter
> but he didn’t reply to my request.)
>
> As before, the code is at https://github.com/casouri/emacs on ts branch.
>
> Yuan

Thank you for your work.  I had some troubles getting the latest code to
compile, so I've sent you a pull request with potential fixes:
https://github.com/casouri/emacs/pull/4  I have signed the FSF papers.

I have a general question about the major modes.  I see there's a couple
of sample major modes, one for C and another for JSON, but they are in
tree-sitter.el.  How would those new major modes be included with Emacs?
Will there be a c-ts mode, separate from cc-mode, which will implement
font lock and indentation in terms of tree-sitter (when Emacs is
compiled with tree-sitter support)?  Or the plan is to extend the core
language modes to offer an option to support tree-sitter? (I'm not sure
how complicated and clean that would be.)

Thanks.


reply via email to

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