From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Mode names for C-like tree-sitter modes Date: Mon, 14 Nov 2022 10:49:58 +0100 Message-ID: <2D2E7C73-87BB-4298-B7E1-6D813F8AF407@thornhill.no> References: <3C23FEAC-6550-48BE-91A3-443B44717C40@gmail.com> <1E870C80-8435-4305-8FA1-A5A8FF681E2C@thornhill.no> <9B1731B7-3DF2-48E1-B18F-7E3FBE50B3DB@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10469"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , =?ISO-8859-1?Q?Simen_Heggest=F8yl?= To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 15 00:48:22 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 1oujBd-0002S5-J8 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Nov 2022 00:48:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouiqd-0003LV-8t; Mon, 14 Nov 2022 18:26:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouihe-00067w-J9 for emacs-devel@gnu.org; Mon, 14 Nov 2022 18:17:23 -0500 Original-Received: from out0.migadu.com ([94.23.1.103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouW6W-0005GQ-RF for emacs-devel@gnu.org; Mon, 14 Nov 2022 04:50:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1668419408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JP1zXLgoABanGNfpniEHFmjP9SGkovBAOptQjsOTe58=; b=RGGpvcs6tyaOtbR4vDScPc8PLNSHvdUHehYRMDuidF+4/ph8oTELG6IPcxqLfzyCsOeEFU IZdS2NxdOHFXMgkwvfAtUN0Ul0r2/0NlNUHODfR09vxft3oSBeNjxYdlX7In6MG3HtdZoy y85/+iOxI+jHdB1AjLDMfOj104BBQxQEqI0fXRl6oy9aRU/1bPCpHXPzqhAabKrzLcNDlL IRFYC51yXU8kLv464cj4lOSkf6APapTYeofI4uWUTWmUahAD/MBX6S/tKFTU77giolb5Jd FbLh7Fu38NP49UsTWBS2uC4VosiqOevkB9fY/PLpScvGlZrX25K+PE2WBCcaJA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <9B1731B7-3DF2-48E1-B18F-7E3FBE50B3DB@gmail.com> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=94.23.1.103; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299776 Archived-At: On 14 November 2022 10:09:58 CET, Yuan Fu wrote: > > >> On Nov 13, 2022, at 10:34 PM, Theodor Thornhill w= rote: >>=20 >>=20 >>=20 >> On 14 November 2022 02:16:13 CET, Yuan Fu wrote: >>> Thanks to Theo=E2=80=99s great work, we now have tree-sitter powered m= ajor modes for C, C++, Java, JSON, CSS=2E Right now they are named c-ts-mod= e, c++-ts-mode, java-ts-mode, etc=2E And c-ts-mode and c++-ts-mode inherits= from a dummy mode c-ts-mode--base-mode=2E >>>=20 >>> I think it=E2=80=99s fair to make C, C++ and Java modes independent, s= ince all the cc-mode options are invalidated when we use tree-sitter=2E How= ever, their name could be improved, IMO=2E But I can=E2=80=99t think of any= thing better than c-ts-mode :-) >>>=20 >>> (neo-c-mode=E2=80=A6 just saying) >>>=20 >>=20 >> I agree and can't think of a better name either=2E=2E=2E > >c-nouveau-mode ;-) > Hah! Why not just yuan-*-mode :) >>=20 >>> c-ts-mode--base-mode should probably be a public mode, since the inten= tion (IIUC) is enable users to configure C and C++ together, by adding hook= s to this base-mode=2E So something like c-base-mode or c-ts-base-mode? >>>=20 >>=20 >> Sure! >>=20 >>> CSS and JSON could be merged with current modes, I think=2E Css-ts-mod= e could merge with css-mode, and json-ts-mode could be merged with js-json-= mode=2E Or we can just have a dedicated json-mode=2E >>>=20 >>> Theo, WDYT? >>>=20 >>=20 >> That's fine with me=2E In any case I think we should remove tree-sitter= support from js-json-mode (or merge them)=2E I think there exist a json-mo= de in both elpa and melpa, adding another isn't the best idea I think=2E= =20 >>=20 >> Not sure what is best, really=2E > >Js-json-mode inherits from js-mode, which complicates the matter if tree-= sitter is enabled for js-mode=E2=80=A6 Probably should remove tree-sitter f= rom js-json-mode=2E Also if we decided cc-mode and tree-sitter should be mu= tually exclusive (which we kind of have), we should remove some cc-mode ini= t in js-mode that runs even when tree-sitter is enabled=2E > Strong agree there :) >The json-mode you mentioned is on ELPA, and is fairly small, we might be = able to merge json-ts-mode with it=2E Simen, WDYT? > >>=20 >> My vote goes to merging css and keeping others separate, but I don't ha= ve the strongest opinion there=2E=20 >>=20 >> I can prepare such a patch after we decide on something=2E > >I can also do it, that=E2=80=99ll save us some patching and merging ;-) > >Yuan If that causes you less work just go ahead :) Theo