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.bugs Subject: bug#61205: 'function' in 3rd element of treesit-font-lock-feature-list Date: Thu, 2 Feb 2023 04:44:28 +0200 Message-ID: <62bd269c-85bc-7689-cad1-d705ea9350cc@yandex.ru> References: 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="12922"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 61205@debbugs.gnu.org, yuan fu To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 02 03:45:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pNPbH-0003AI-HW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Feb 2023 03:45:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNPaz-0005Gq-0K; Wed, 01 Feb 2023 21:45:05 -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 1pNPax-0005GX-EU for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 21:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNPaw-0002kh-VA for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 21:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNPaw-0002uG-IV for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 21:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Feb 2023 02:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61205 X-GNU-PR-Package: emacs Original-Received: via spool by 61205-submit@debbugs.gnu.org id=B61205.167530588011125 (code B ref 61205); Thu, 02 Feb 2023 02:45:02 +0000 Original-Received: (at 61205) by debbugs.gnu.org; 2 Feb 2023 02:44:40 +0000 Original-Received: from localhost ([127.0.0.1]:60272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNPaZ-0002tN-RE for submit@debbugs.gnu.org; Wed, 01 Feb 2023 21:44:40 -0500 Original-Received: from mail-ej1-f50.google.com ([209.85.218.50]:36581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNPaX-0002tA-CY for 61205@debbugs.gnu.org; Wed, 01 Feb 2023 21:44:38 -0500 Original-Received: by mail-ej1-f50.google.com with SMTP id lu11so2192514ejb.3 for <61205@debbugs.gnu.org>; Wed, 01 Feb 2023 18:44:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=eWATD5LB3OHLCXYfvO9bSw4ys7X1GqnZEd0uSFIOtm4=; b=QWWNPSsAUyJMlcgfpGEFjl8VWDr9hmeaoiOSF3cjzgi37HB2lJyOmsLost5lGR2wG6 9RXS+kNHO8bzpp8fPxiZEAOeQYfAisy288xedgfulQU6T7pgUnHDmy8K6o9QpFsuk5oW LCn32giFqA73GMtNBTlu/l2cWQx9Pjt21tZhOMpnUbnOoxbJIGCI4yT7Xb2aQdxjy9EN MMrm7/QR4Bts7jvohTjfJe6TsneKWatQO7+lC3fParGKrUpGQUcFvO42BavIy0h8g0uD 7XXJVEBLP3v5VU/FFS/f7+f7B5wmrxXfSHCGlNbx0QjukdbhY+OuBhPTN6EtSCrlSHiC Mu5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eWATD5LB3OHLCXYfvO9bSw4ys7X1GqnZEd0uSFIOtm4=; b=yQGWpTaYgxQy67hCz+33MNwY4rszJDQTl+akgVTs4raV9LC9Vc4kmWxJ3f+b5joNmu ud36abi4x1duBlZYr1wR+hh+9BCN3pByPMJoP8Llxq3z5R1DQHprQXyIggs7thnSWIr2 3Eepy5cvFShJ/LgjhVohB4ZJnyaSL76NAAawnRYFfbIfNcAxwaUrJllhpBC7bMcbfIdx b2pHVkV+scE8n3xFyIx67+UdC8h4/BmAmqcDgFN1PAXR0EzrWM/80vJ9siv7L1hrapLN NTASgrRbgunSHSB3qQ6NFi0vzgHKJDGqbOES9vLBVfeqd5570FZ01sHnOpDwqRTFh3fF x0vQ== X-Gm-Message-State: AO0yUKVO95Ij+a9xVm6HXq9gniHW0K83pvTa7GLrTfCcJP5Ljy9uxFP/ G/aADfQyZG3zqWvR3xQ2EwA= X-Google-Smtp-Source: AK7set8bIeAVZ0JpC+HDJLxAWW2MBclVSYpcuULmjIR8gFbQGqpK573BQixz2YjJ1E58NX25WPudOQ== X-Received: by 2002:a17:906:254b:b0:879:4f94:41eb with SMTP id j11-20020a170906254b00b008794f9441ebmr4354810ejb.72.1675305870274; Wed, 01 Feb 2023 18:44:30 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id w5-20020a170906384500b00878003adeeesm10687258ejc.23.2023.02.01.18.44.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 18:44:29 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254620 Archived-At: On 02/02/2023 04:34, Randy Taylor wrote: > On Tuesday, January 31st, 2023 at 21:08, Dmitry Gutov wrote: >> X-Debbugs-Cc: Yuan Fucasouri@gmail.com, Randy Taylordev@rjt.dev >> >> >> Some new built-in modes has 'function' feature highlighting thus enabled >> by default. >> >> rust-ts-mode, go-ts-mode, cmake-mode >> >> Should we move it to 4 for consistency with the rest? >> >> Previously, we talked about that and concluded that function calls are >> usually everywhere and are easy to notice without additional highlighting. > If that's what folks decided on then we should keep everything consistent. > > Personally, I find it odd that out of the box default highlighting wouldn't highlight function calls. I think that's more useful in some languages, and less in others. I guess we settled on this particular convention to be more consistent with existing major modes in Emacs. But I can see how it can be appealing, especially in languages with more complex syntax such as Rust. Same for 'property'. The one feature that I'm fairly certain is currently useless is 'variable', because we don't have any variable scope tracking (yet), and the grammars don't do it for us. So too many tokens get highlighted with font-lock-variable-name-face. Try the current rust-ts-mode, for example: almost everything ends up with that face.