From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Is it better to add treesitter modes to core? Date: Tue, 9 Jan 2024 19:50:17 +0200 Message-ID: <7919cda7-a09e-498c-87e7-6a1733b0eeed@gutov.dev> References: <87a5phiap4.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29922"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Stephen Leake To: Stefan Kangas , Philip Kaludercic , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 09 18:51:18 2024 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 1rNGFw-0007XL-IP for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Jan 2024 18:51:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNGFE-0000pV-UM; Tue, 09 Jan 2024 12:50:32 -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 1rNGF8-0000p6-1s for emacs-devel@gnu.org; Tue, 09 Jan 2024 12:50:31 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNGF5-0003FH-PC for emacs-devel@gnu.org; Tue, 09 Jan 2024 12:50:25 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 20FD35C02A0; Tue, 9 Jan 2024 12:50:21 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 09 Jan 2024 12:50:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1704822621; x=1704909021; bh=vE3aWmxtvrGPXYiia7B1BAYgNwGyuTw+mhd3g8luEcg=; b= aY79yy1+EH5ZLW+mJ7eVxjmZqme7aDDeFCcf3OlBwNCUta3zR393a/D5WRTcQin7 A5oF19aVqKAwzAkehuubAKPF2TUejN7TycOPVd+QRu2SPZaOQpXsmi3mOiIY8iPR 6XKYVgfy3DuqRULHjnwuCPb2BphEN9mDpCbMwKwVOAuA8HU+ReKQU5rU+OGuTndM ZqQRyDPqkqTBq03jlBTjQWpNk0j+C754fFMuutEittq5vxctn8hvosV+/DC3aM9O 9S81Gxn98mIS/WsvQqhvmxj+hI0ja0k8BKGrKm5IBKFeDQUcUtYGIsnpp/5cu870 2uvIiXmjI/6Zu6gxO6Tljw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1704822621; x= 1704909021; bh=vE3aWmxtvrGPXYiia7B1BAYgNwGyuTw+mhd3g8luEcg=; b=t yEpVU/9haBt+l+4c5xqKFbNtAsg2UUbQOPs/+hAbTrSt8X7pApb4bEGTM34QXpt4 Z2Kt0Gft7Y7nZ2e+RIS7Tjv1Mp2J0WWM4w9Hc1EtB0Atdt6jIITJhEqF8HWOyVIn SRp6aF18vsHrYrdyIAJBmrDOQGwIS4ePjXi3P6ko8FshgGECjTm67HBiBHAvNsAT TqwlYcCwjp3FMkubyhS8pe20GHXYEwDR/dx+m0Ufv40qVdNadvU+qWb+Mcygr63s oOhYHa4b3KGMwNwDI0+BLvrBCIUDqo31dmn8QpWwNojadjgKTMgkJ1dzcpubl+T3 /XAcx1oHLi/jqx/iBztKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeefkeehueetieegveeltdejfeehfeehheejheekuefhfeefleevffelheef hfdvveenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Jan 2024 12:50:19 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=dmitry@gutov.dev; helo=out3-smtp.messagingengine.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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:314782 Archived-At: On 09/01/2024 07:20, Stefan Kangas wrote: >>> In my ideal world, we should have basic editing support in place in >>> Emacs for typical tasks, and packages should provide extensions. Most >>> users don't particularly enjoy starting work with installing a bunch of >>> extras. >> >> The way VS Code works and its level of popularity seem to say >> otherwise. > > Yes, but VSCode has some niceties that we don't. When Emacs displays an > unobtrusive little popup in the right corner saying > > "Hello, this looks like $LANGUAGE, do you want to install support > for that? [YES/NO]" > > then I will agree with you that it's less important to keep stuff in > core. That seems like the wrong positioning of the cart and the horse, IMHO. As we've observed, moving things out of the core is *hard*. >>> Take a look at how much better things are elsewhere and weep: >>> >>> https://github.com/vim/vim/tree/master/runtime/syntax >>> >>> Yes, vim is different, their job is easier and so on and so forth. >> >> It is only better if the features provided in there are reasonably >> complete and well-maintained. > > Do you have any reason to believe that they're not? For the very small > sample set that I've looked at, they certainly blew the corresponding > Emacs modes out of the water. It's difficult for me to say, since I'm not really proficient in Vim, so whenever I tried to use it with Ruby, it never quite worked. Reading the code, it seems one of the most complex ones, though. It even has some sort of basic completion using external program. But FWIW it doesn't look like it'll do much in any non-trivial project, and as for syntax highlighing and indentation, I think we're ahead, feature-wise. > For some of the things listed there, we don't even have a mode. I'm pretty sure we would have one somewhere, if not in-tree, for the vast majority of cases. >>> I think historical context matters here. Ada is not exactly in vogue >>> these days, but it _is_ supported by GCC, and it has an ISO standard. >>> It's not some random novelty language for people that feel that >>> Typescript is not edgy enough, or anything like that. >>> >>> We also happened to support it in Emacs for ages. >> >> And it's still there in ELPA, available for everybody to install. >> >> Note that I don't mean to belittle Stephen's work, nor have any desire >> to throw it away, but the sentiment "it's unmaintained, let's bring it >> in the core and see what happens" sounds very wrong to me. >> >> It would be a good idea for the interested parties to pay more attention >> to ELPA and improve it there. > > I'm not yet convinced that we should add a new ada-ts-mode.el to core. > The fact that it wouldn't have a dedicated maintainer deeply invested in > the language certainly speaks against it. I think it will be a good idea to have someone check out the ada-ts-mode I linked to previously in this thread, and maybe talk to the author about adding it to ELPA (GNU or NonGNU), if no major problems come up. So far it looks like it has very little users (judging by the numbers of stars and open/closed issues - which is zero), that's kind of sad. > I'm also not sure that we would want something half-baked in core for a > language with a small user base, since that makes it less likely that an > Emacs mode maintainer will step forward. > > The strongest argument for keeping the more venerable languages around > is that their support is super stable, after all. Agreed.