From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jostein_Kj=c3=b8nigsen?= Newsgroups: gmane.emacs.devel Subject: Re: Status update of tree-sitter features Date: Fri, 30 Dec 2022 15:27:16 +0100 Message-ID: <82501cb9-f51c-da5d-9f10-247d99012cb1@secure.kjonigsen.net> References: <5d53b299-14e1-6f8b-58b3-7e16842d87a9@yandex.ru> Reply-To: jostein@kjonigsen.net Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Cc: Dmitry Gutov , emacs-devel To: Stefan Monnier , Yuan Fu , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 30 15:27:42 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 1pBGMG-0009ec-9u for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Dec 2022 15:27:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBGM0-0008S5-6I; Fri, 30 Dec 2022 09:27:24 -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 1pBGLy-0008Rq-4f for emacs-devel@gnu.org; Fri, 30 Dec 2022 09:27:22 -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 1pBGLw-0002Dx-0d; Fri, 30 Dec 2022 09:27:21 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 9F0805C0078; Fri, 30 Dec 2022 09:27:18 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 30 Dec 2022 09:27:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:reply-to:sender :subject:subject:to:to; s=fm1; t=1672410438; x=1672496838; bh=Fh MjMIhTnZCi24PZsenFJnoFvzU8Gd66b7TqAFQFFyE=; b=JhGKtbwLertSE/QXqV Gh8EZOIhDcMpjt1//TYgPOSNvkj+e/lyHODxTQ2Lth8U5UYlMfpEBU//dqvmXKyy VuX4vvuJWSxNzEO8h9mB4lnHDN1Ij0HpcNyeiqEYy4He/OW7cvqAwQN3b5QMck/K lToznkgZ8SBQm1bgFZBhfGo57bM2LmBaQCnZj50L15f1ovd/ua6jI9JWKVBDFfY5 S2hh1bHW7W6/zjf2q67cQhUublF71EIKZPUWVpXyNlX3ALBrq5PfMzbl3J3Yfd5j kbVVRl4mkfDik5J4xPEZ7+9QaPb6/4SpPyjVwmInqYgTdz8aPNXL2ebqVO9FAq++ zKSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1672410438; x=1672496838; bh=FhMjMIhTnZCi24PZsenFJnoFvzU8Gd66b7T qAFQFFyE=; b=nOeH5XSX/8s1IZgR/EzBj7K/gm8TPtLowCCPpuHrBfwYBuy3Tom 1o8oR/p2cniO+OFzutQ7oJkiSCa/DWGZqsLTiiizrixj86RYKLlU7vTtWboLdpQ2 TKD9X8fQhkM9eS4et5VAewuq3l3gSkEFJUWPqcId0klpNTm+v3BmLY382x3D8/ys /hwayxU7zlivHhkOklyw98NXMHDp1mNflq0xoDsQtQ6Dkp0YIGywnqjEVhLRP0xX ai2Tr8fAVAZYeNu2O3l5Eqw5a1cQSaLwJ9hzOF5erUfJKMxGUSaPvROaP0DNNXhe 19pMWPykBksK8JPsfDIkH61KzUGPc00/MnQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrieeigdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfghruffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeflohhs thgvihhnucfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonh highhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpedtfedtkedtffeukedvvddvkeeu veduvdeitdfffffggfegledtkeehgfdtjeekveenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhn ihhgshgvnhdrnhgvth X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Dec 2022 09:27:17 -0500 (EST) Content-Language: en-GB, nb-NO In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=jostein@secure.kjonigsen.net; helo=out3-smtp.messagingengine.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-1.146, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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:302108 Archived-At: Hey everyone. Sorry for being late to the party. As far as I can tell, there seems to be mostly consensus on the overall picture, while some different opinions wrt to what to actually standardize. On 29.12.2022 04:28, Stefan Monnier wrote: >>> If it's only about calls, maybe call this category funcall? >> Function, property and variable are for every occurrence of them (the touted >> “consistent highlighting”). > In my own use, the difference between a definition and a use is more > important than the difference between a variable name and a method name. > I'm not fundamentally opposed to highlighting funcalls, but it is > indispensable that funcalls get a different face from > function definitions. > > > Stefan > I know that some people prefer "sparse" syntax-highlighting, while others prefer more "complete" highlighting. Personally, I value being able to see function invocations, and love how tree-sitter makes that easy to highlight. As long as we have ways to accommodate both needs ("fruit salad" vs more sparse fontification) I'm going to be happy, and we kind of already have that through font-lock levels in the modes already. That said, some of the tree-sitter based major modes (half? most?) currently highlight function-invocations on level 3. If we are to make everyone happy, we need to make changes to that, and move that to 4. Which leads me to my main point here. Emacs 29 release is near. We should seriously limit the amount of changes we apply in order to fix the things we need. Deciding at this point to rework all the features, which features we should have, how they can be enabled/disabled, and what enabling/disabling those should entail in practice... That's essentially suggestion we rewrite all those tree-sitter-based major-modes. I think a much more realistic strategy at this point is: - to aim for what concrete things should be fontified at level 3 and 4 (default vs max). We already know 1 thing we want to change here. - ensure the major-modes adhere to this with a minimum of changes in the existing code. - and most importantly: leave the discussion about adding the ability for users to enable/disable specific features, and how that should work in practice (overlap, presedence, etc) for Emacs 30. Doing so would leave the new tree-sitter based major-modes pretty much functionally on par with existing major-modes (or better, more accurate), and it buys us a full, new release-period to figure out how we can leverage tree-sitter to give end-users better customization options, instead of coming up with ideas at the verge of release, without having time to let those ideas mature. This will end up being an API of sorts, and from my experience you don't want to rush those. My 2 cents. -- Jostein