From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties Date: Sun, 19 Feb 2023 00:50:30 +0000 Message-ID: References: <6209c097-0369-828a-7513-d8afb73fd7f0@secure.kjonigsen.net> <6b75a99f-05fd-cde9-e9fe-7191f12d72e1@yandex.ru> <8b3e632b-18de-f23c-675a-24905bbfbc23@yandex.ru> <15bf5d5d-bd41-15db-750c-251342eef026@yandex.ru> <19be600c-f358-3824-53d2-fd00d074c601@yandex.ru> 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="39331"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= , Yuan Fu , 61302@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 19 01:51:18 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 1pTXvB-000A2i-Lb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Feb 2023 01:51:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTXuy-0004Tg-Qm; Sat, 18 Feb 2023 19:51:04 -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 1pTXuw-0004TW-Pu for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 19:51:02 -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 1pTXuw-0004Ai-HD for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 19:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTXuw-0008TO-DO for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 19:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Feb 2023 00:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61302 X-GNU-PR-Package: emacs Original-Received: via spool by 61302-submit@debbugs.gnu.org id=B61302.167676785032551 (code B ref 61302); Sun, 19 Feb 2023 00:51:02 +0000 Original-Received: (at 61302) by debbugs.gnu.org; 19 Feb 2023 00:50:50 +0000 Original-Received: from localhost ([127.0.0.1]:45237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTXuj-0008Sw-Ig for submit@debbugs.gnu.org; Sat, 18 Feb 2023 19:50:49 -0500 Original-Received: from mail-4323.proton.ch ([185.70.43.23]:60035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTXuh-0008Sj-EO for 61302@debbugs.gnu.org; Sat, 18 Feb 2023 19:50:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1676767841; x=1677027041; bh=8f22GHKf5s4H8zRm0DgoTgMYjdGKTkkeJwxTK1vN/d4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=mEIZYNddBGQqDkASKa5OhbvYT2f0aGLGY1L8ZLiUng4I6QzXpyvIT8su0LAzsC4AD OMTTINmHCOSvdXyZ9ejaXfVJsyQ798jpNxJgo79W47GwDNwjpkDQixIwWL3IFNHMci ase/cesn7OVuFMMt6clOrzANCUMY8RJzV1o944wrqpVOU9FAgv0lLGqNN39pv3uv6b z9C6SO9lQzpU7/MA9dJI1K1jRjoI01ttVVO5eWmc1RNVWb7lXrkXIPPqX9tAyiwh7h iEJv2rJed3RbuKciM0xME9bBVEwYPYoeOvQroJqbDrn2ThEPo3BEweYD2U0DTLj9UT XxhwHZl7W0k0A== In-Reply-To: <19be600c-f358-3824-53d2-fd00d074c601@yandex.ru> Feedback-ID: 44397038:user:proton 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:256012 Archived-At: On Saturday, February 18th, 2023 at 19:13, Dmitry Gutov = wrote: > On 19/02/2023 01:31, Randy Taylor wrote: >=20 > > Fix one bug, introduce another =F0=9F=98=89. > >=20 > > Any use declaration tail (I guess that's the lingo we're using?) should= not have a face applied to it if it's lowercase. >=20 >=20 > I guess we do. Unless you have better naming suggestions ;-) Nope, I like it :). >=20 > > For example: > > `use deeply::nested::function as other_function;` > > function should not have any face applied to it. > >=20 > > `use a::b::{C, d, e::F, g::h::I, g::h::i};` > > i should not have any face applied to it. > >=20 > > Only if they are capitalized should we give them a face: font-lock-type= -face. > > As it stands now, they are all font-lock-constant-face. > >=20 > > The previous patch was perfect except for the missing use_as_clause que= ries - if I add those back, I think everything is good unless I'm missing s= omething. >=20 >=20 > Thanks for catching that, I missed one treesit-node-parent call when > inlining a function. Looks good now! >=20 > > > > The variable feature is highlighting some things incorrectly (it wa= s before too, but I think it's a little worse now). > > > > Adding these to rust-ts-mode--variable-p takes care of the issues t= hat I see. > > > > `((equal "extern_crate_declaration" parent-type) nil) ((equal "life= time" parent-type) nil) ((equal "scoped_type_identifier" parent-type) nil) = ((equal "use_as_clause" parent-type) nil) ((equal "use_list" parent-type) n= il)` > > >=20 > > > This should be taken care of by the new approach (enumeration of all > > > allowed parent types). > > > Missing: > > > (closure_parameters (identifier) @font-lock-variable-name-face) >=20 >=20 > This one goes into the 'definition' feature. I just made that change > today in emacs-29, check it out. >=20 > > (field_initializer value: (identifier) @font-lock-variable-name-face) >=20 >=20 > Thanks, added. Also added unary_expression. >=20 > > Would it be possible to alphabetize the queries in the variable feature= BTW? It makes it easier to see what's there/missing. > > And you know I like things alphabetized =F0=9F=98=89. >=20 >=20 > No problem! I generally like to group by functionality, but alphabetic > is fine, and this case seems particularly suited to it. >=20 > See the revised in attachment. Ship it! Thanks for working on this.