emacs-devel
[Top][All Lists]
Advanced

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

Re: Call for volunteers: add tree-sitter support to major modes


From: Alan Mackenzie
Subject: Re: Call for volunteers: add tree-sitter support to major modes
Date: Mon, 17 Oct 2022 18:47:34 +0000

Hello, Eli.

On Mon, Oct 17, 2022 at 20:59:05 +0300, Eli Zaretskii wrote:
> > Date: Mon, 10 Oct 2022 19:44:40 +0000
> > Cc: Theodor Thornhill <theo@thornhill.no>, Eli Zaretskii <eliz@gnu.org>,
> >  emacs-devel <emacs-devel@gnu.org>
> > From: Alan Mackenzie <acm@muc.de>

> > > I think we can use the same major mode, just skip the cc-mode
> > > initialization and only enable tree-sitter stuff if
> > > java-use-tree-sitter is true. But I want to know Alan’s thought on
> > > this. I included him in CC.

> > Thanks!  At the moment, I'm still trying to get a handle on what
> > tree-sitter is and can do.  The idea of including lots of tree-sitter
> > modes in Emacs 29 came up very suddenly over the weekend.

> Alan, any progress in that direction?  Do you have any thoughts to
> share?

Generally, that the replacement of CC Mode's engine with tree-sitter is
a good idea; CC Mode as it currently is is too much work to maintain,
and in the long run is unsustainable.

At the same time, I have no idea how good tree-sitter's grammars for CC
Mode's modes are.  If I understand rightly, a call to TS requires start
and end buffer positions to be calculated by Emacs rather than TS
itself.  This might reduce some of the expected speed gain.

I would like to keep all of CC Mode's user features in the new mode, if
at all possible.  I don't know how easy it will be, for example, to keep
CC Mode's indentation styles working in the new mode.

I can't honestly see myself as able to integrate tree-sitter into CC
Mode in the short time before the planned pre-test of Emacs 29.  I think
we should take up the offer made by João Paulo Labegalini de Carvalho
<jaopaulolc@gmail.com> on 2020-10-11 to work on C Mode and possibly C++
Mode.

I'm afraid I've only read a small part of this thread on emacs-devel, so
there's likely quite a bit of relevant stuff I've missed.

> TIA

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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