[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter api
From: |
Yuan Fu |
Subject: |
Re: Tree-sitter api |
Date: |
Sat, 18 Dec 2021 18:48:02 -0800 |
> On Dec 18, 2021, at 5:39 AM, Daniel Martín <mardani29@yahoo.es> wrote:
>
> 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.
Yes, sorry, I forgot to push fixes after merging. I included your fix for the
switch case. Thanks.
>
> 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.)
They are just my experiments and I included them in tree-sitter.el as examples
for anyone want to try out tree-sitter. They will be removed when tree-sitter
integration merges into master. Each major mode should optionally take
advantage of tree-sitter features according to tree-sitter-enable-p. (At least
that’s my plan, no one has objected to this approach so far.)
Yuan
- Re: Tree-sitter api, (continued)
- Re: Tree-sitter api, Yuan Fu, 2021/12/18
- Re: Tree-sitter api, Eli Zaretskii, 2021/12/19
- Re: Tree-sitter api, Yuan Fu, 2021/12/19
- Re: Tree-sitter api, Yoav Marco, 2021/12/24
- Re: Tree-sitter api, Yoav Marco, 2021/12/24
- Re: Tree-sitter api, Yuan Fu, 2021/12/25
- Re: Tree-sitter api, Eli Zaretskii, 2021/12/25
- Re: Tree-sitter api, Yuan Fu, 2021/12/26
- Re: Tree-sitter api, Eli Zaretskii, 2021/12/26
Re: Tree-sitter api, Daniel Martín, 2021/12/18
- Re: Tree-sitter api,
Yuan Fu <=