From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Call for volunteers: add tree-sitter support to major modes Date: Tue, 11 Oct 2022 09:51:16 +0300 Message-ID: <83k056g8ez.fsf@gnu.org> References: <83czb1jrm3.fsf@gnu.org> <878rlo7on0.fsf@thornhill.no> <83o7uki5ol.fsf@gnu.org> <87tu4c5g9j.fsf@thornhill.no> <835ygshz6k.fsf@gnu.org> <87zge3jj0j.fsf@gnus.org> <83o7uig9dm.fsf@gnu.org> <9E2D0EEB-3910-4C58-96E7-68E7C84E5097@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22313"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, acm@muc.de, emacs-devel@gnu.org, jostein@kjonigsen.net To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 11 09:12:06 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oi9Qs-0005gm-Cv for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 09:12:06 +0200 Original-Received: from localhost ([::1]:38370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oi9Qq-0004Nn-Ns for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 03:12:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi96c-00020b-CI for emacs-devel@gnu.org; Tue, 11 Oct 2022 02:51:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi96Z-0004eM-OW; Tue, 11 Oct 2022 02:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=SU03b6PwiLPDo+/8ksbmL1L5V33eGUtxWcic+VrqGr8=; b=l3WyL7Pd0OME B5wXfshRfzK70mIOqbwJKTIa3Lcwp8ILE1s4qR8e9jzcEEoGOv6pXZFxs1A+xQcJhfMRE5s0o7RjS 4A5JASE7Y3eJmDrgt7sqWcFURrIzWj+HVEqw7lFJhchmi/KjcSA/pPsi8EAzRgBESOazrAcshEyL6 dx3T99uNKNIh7QodBBlNdIa/T/l/HD7VsnA8HngFm1dyRL1k5DXmVqq5LHoYO4a6aE8PVO0sxsfOX PBj5m4DfqDSExdHaYycVL8V8XxJ/58KvOZgp9yiOthyCaCHRsOwjTyaM9NB6mckq5qLj0ZGcMmLnh vl5uB8AW7KLR/ZuC4EaCqw==; Original-Received: from [87.69.77.57] (port=1865 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi96Z-0006kP-CD; Tue, 11 Oct 2022 02:51:07 -0400 In-Reply-To: <9E2D0EEB-3910-4C58-96E7-68E7C84E5097@thornhill.no> (message from Theodor Thornhill on Tue, 11 Oct 2022 08:41:58 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297431 Archived-At: > Date: Tue, 11 Oct 2022 08:41:58 +0200 > From: Theodor Thornhill > CC: acm@muc.de, emacs-devel@gnu.org, jostein@kjonigsen.net > > >> 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? Sounds good, but I don't use these modes, so take my opinions with a grain of salt. > >> 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. SGTM. > Why is that desirable, though? It prevents user confusion and conflicts, I guess?