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: Yuan Fu
Subject: Re: Call for volunteers: add tree-sitter support to major modes
Date: Sun, 9 Oct 2022 17:01:45 -0700


> On Oct 9, 2022, at 1:01 PM, Theodor Thornhill <theo@thornhill.no> wrote:
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
>> 
>> Some of the popular major modes for which we would like to see
>> tree-sitter support in Emacs 29 are:
>> 
>> c-mode
>> c++-mode
>> emacs-lisp-mode
>> js-mode
>> js-json-mode
>> ruby-mode
>> shell-script-mode
>> 
> 
> I'd like to add in Java support here as well.  But since java is part of
> cc-mode.el, maybe it'd be best if it got its own mode, say
> java-treesitter-mode.el, so that we don't add a dependency into cc-mode?
> If you agree, I can create such a major-mode as well.

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.

> Also, how should we mandate what modes get the new tree-sitter support?
> It is pretty fast to add new modes, and adding support for languages not
> already supported in core, such as say, golang, should be very feasible.
> But maybe that is something that should live in elpa?

If you want to add tree-sitter support for some built-in mode, go for it. But I 
would focus on the modes we already have in core. For modes like golang where 
there is a widely used mode out there (in this case on ELPA), we should either 
ask to move it into core first, or ask the author to maybe add tree-sitter 
support, or submit a patch to him/her, rather than creating a duplicate go-mode 
in core just for the sake of tree-sitter.

Yuan


reply via email to

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