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: Theodor Thornhill
Subject: Re: Call for volunteers: add tree-sitter support to major modes
Date: Tue, 11 Oct 2022 08:41:58 +0200


On 11 October 2022 08:30:29 CEST, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: Theodor Thornhill <theo@thornhill.no>,  acm@muc.de,
>>   emacs-devel@gnu.org,  jostein@kjonigsen.net
>> Date: Tue, 11 Oct 2022 02:34:04 +0200
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> My suggestion is to add the tree-sitter variant in these cases, and let
>> >> the other modes die a slow, deprecated death down the line.
>> >> 
>> >> What do you think?
>> >
>> > SGTM, but I'd like to hear from Lars as well.
>> 
>> It's somewhat confusing that we have some modes that are tree-sitter-only
>> and some what can switch between using tree-sitter and not, but I guess
>> that's inevitable.
>
>We could arrange for a very minimal font-lock without tree-sitter
>(like, for example, only strings and comments?), and use the defaults
>for the indentation commands.  Theodor, can that be done with a
>relatively small effort?

Yes, we could actually just delegate that work to vanilla js-mode, as 
Typescript is just a superset of Javascript. That would mean we would get the 
benefits of that lineage, but missing some more advanced highlights etc. 

What do you think? 

>
>> But I think the in-tree tree-sitter typescript-mode will have to be
>> called something else than the out-of-tree non-tree-sitter one, at
>> least.
>
>That's desirable, yes.

Sure, I can rename it to tsx-mode, because that's the parser being used. Why is 
that desirable, though? 

Theodor



reply via email to

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