From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Mode names for C-like tree-sitter modes Date: Mon, 14 Nov 2022 01:09:58 -0800 Message-ID: <9B1731B7-3DF2-48E1-B18F-7E3FBE50B3DB@gmail.com> References: <3C23FEAC-6550-48BE-91A3-443B44717C40@gmail.com> <1E870C80-8435-4305-8FA1-A5A8FF681E2C@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="2651"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 15 00:39:25 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 1ouj2z-0000RG-L9 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Nov 2022 00:39:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouirG-0004eP-OL; Mon, 14 Nov 2022 18:27:18 -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 1ouih7-0004ws-Su for emacs-devel@gnu.org; Mon, 14 Nov 2022 18:16:51 -0500 Original-Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ouVTp-0008Js-Sz for emacs-devel@gnu.org; Mon, 14 Nov 2022 04:10:30 -0500 Original-Received: by mail-pl1-x62b.google.com with SMTP id p12so9506112plq.4 for ; Mon, 14 Nov 2022 01:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I9YT+jSVzIuGQi2Ep0B3yxIzO2gtuCh0FdhHcsZhoTQ=; b=GZcKNkUTmhQ5LwQwT4+MUNEKQqGIJ7PLnNqJNag9PfOpjIrZ2F5APq2/JU93NWJ/Ss rWO/RlXSVpAkisTAt6QJiUN5qN5XuJJ0uE1ZTjAU0Y7N3jxJKBUVU+7l0Ac8v/ce+ovx z1XtEUHi5wud7Eq/ZdClXrpDd9D/C0t7iuIUqyuiDi69FE2Xqel2lpmDxQH+KNMoFy/P vhSD5jCtZEaTGCrTHs67F7vXu8stHzPwLtg85cjctsBv1cpnFsxPCdzN1hKzvYEE8Wyc dkT81Ibtq+eRwBc5y8cP1vixOvcNYD+OE8n7vePhCh837B31UVw1LU+rF23WBsKTFmCv swhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I9YT+jSVzIuGQi2Ep0B3yxIzO2gtuCh0FdhHcsZhoTQ=; b=m5MhwZLu9S8UkbAsY49WpvlImewnQYZT0fAukbn88f5irkSldJnfbtckPg2pSa4c/0 Ux9G6VJ/ru6oFvEWdL/7tA0KvkgOYm0q5F9xttvGpc/gSXFKlBHviN2vqxb9gz7pQhzT SnWOl28SfRUymLJaICuvWb9s6PTzUa7tybZPiTRYGthnjPeCRoIurP33Jr+PRyaF55d1 yYIqQARhPbEEhlrpaI6pzjlJEOWwz9lv0So9QgE71xqSLSmfuiNcds21dos8yB1/HokQ jFKZgZD5lhqvYJlv2zTFlsB2QyYKinbDWKMLykOfSqYpceyE69dM5KSDptvWWJ5+abhN xXJg== X-Gm-Message-State: ANoB5pltAlsdRB4yte5VvWy/pZuFRc5s32hwTLBSwIwuPABeQn8mem9F 3A8tjKqHk3XNOkZUhXdWXgI= X-Google-Smtp-Source: AA0mqf7UxElWkn9PWHsG1cyzrPj7sb7nuDPixJR0OfwZdBn/suZSUQoOdWqnBWoV9aPpuTkVYQDUXg== X-Received: by 2002:a17:902:f549:b0:184:e4ac:d135 with SMTP id h9-20020a170902f54900b00184e4acd135mr12348932plf.47.1668417000593; Mon, 14 Nov 2022 01:10:00 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id s34-20020a635262000000b0042988a04bfdsm5495069pgl.9.2022.11.14.01.09.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2022 01:10:00 -0800 (PST) In-Reply-To: <1E870C80-8435-4305-8FA1-A5A8FF681E2C@thornhill.no> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=casouri@gmail.com; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:299775 Archived-At: > On Nov 13, 2022, at 10:34 PM, Theodor Thornhill = wrote: >=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 = major modes for C, C++, Java, JSON, CSS. Right now they are named = c-ts-mode, c++-ts-mode, java-ts-mode, etc. And c-ts-mode and c++-ts-mode = inherits from a dummy mode c-ts-mode--base-mode. >>=20 >> I think it=E2=80=99s fair to make C, C++ and Java modes independent, = since all the cc-mode options are invalidated when we use tree-sitter. = However, their name could be improved, IMO. But I can=E2=80=99t think of = anything 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... c-nouveau-mode ;-) >=20 >> c-ts-mode--base-mode should probably be a public mode, since the = intention (IIUC) is enable users to configure C and C++ together, by = adding hooks to this base-mode. 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. Css-ts-mode = could merge with css-mode, and json-ts-mode could be merged with = js-json-mode. Or we can just have a dedicated json-mode. >>=20 >> Theo, WDYT? >>=20 >=20 > That's fine with me. In any case I think we should remove tree-sitter = support from js-json-mode (or merge them). I think there exist a = json-mode in both elpa and melpa, adding another isn't the best idea I = think.=20 >=20 > Not sure what is best, really. 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 from js-json-mode. Also if we decided cc-mode and = tree-sitter should be mutually exclusive (which we kind of have), we = should remove some cc-mode init in js-mode that runs even when = tree-sitter is enabled. The json-mode you mentioned is on ELPA, and is fairly small, we might be = able to merge json-ts-mode with it. Simen, WDYT? >=20 > My vote goes to merging css and keeping others separate, but I don't = have the strongest opinion there.=20 >=20 > I can prepare such a patch after we decide on something. I can also do it, that=E2=80=99ll save us some patching and merging ;-) Yuan=