[Top][All Lists]

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

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

From: Jostein Kjønigsen
Subject: Re: Call for volunteers: add tree-sitter support to major modes
Date: Tue, 11 Oct 2022 08:58:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1

If someone has typescript-mode installed from MELPA and upgrade to Emacs-29... Which typescript-mode are they going to be running?

Emacs does not support namespaces, so there would be no way to separate those two. And if the MELPA version runs, it would shadow the Emacs29 implementation.

Since I believe in keeping things simple for users, I think another option we could consider would be to simply make typescript-mode (the plain elisp version hosted on MELPA) simply not register itself if it finds that the tree-sitter version is already available from Emacs. And then we could stop updating it, and people would eventually stop installing it.

Speaking as one of the MELPA typescript-mode co-maintainers, I have absolutely zero plans for maintaining the old elisp-based version once a better, tree-sitter version has been mainlined into Emacs itself.



On 11.10.2022 08:41, Theodor Thornhill wrote:

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
That's desirable, yes.
Sure, I can rename it to tsx-mode, because that's the parser being used. Why is that desirable, though? 


reply via email to

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