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: Sat, 18 Feb 2023 23:31:35 +0000 Message-ID: References: <6209c097-0369-828a-7513-d8afb73fd7f0@secure.kjonigsen.net> <5075852e-480b-7ca9-ba46-8de230ed8df5@secure.kjonigsen.net> <6b75a99f-05fd-cde9-e9fe-7191f12d72e1@yandex.ru> <8b3e632b-18de-f23c-675a-24905bbfbc23@yandex.ru> <15bf5d5d-bd41-15db-750c-251342eef026@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="1942"; 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 00:32: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 1pTWgq-0000IZ-6Z for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Feb 2023 00:32:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTWga-0001EI-7h; Sat, 18 Feb 2023 18:32:08 -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 1pTWgW-0001E0-SD for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 18:32:05 -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 1pTWgU-000442-QD for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 18:32:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTWgU-0006Jo-Bb for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 18:32: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: Sat, 18 Feb 2023 23:32: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.167676311124268 (code B ref 61302); Sat, 18 Feb 2023 23:32:02 +0000 Original-Received: (at 61302) by debbugs.gnu.org; 18 Feb 2023 23:31:51 +0000 Original-Received: from localhost ([127.0.0.1]:45164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTWgI-0006JM-NT for submit@debbugs.gnu.org; Sat, 18 Feb 2023 18:31:51 -0500 Original-Received: from mail-40136.proton.ch ([185.70.40.136]:53413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTWgG-0006J8-OW for 61302@debbugs.gnu.org; Sat, 18 Feb 2023 18:31:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail2; t=1676763102; x=1677022302; bh=eXPlPz+qfuALNaEuSQ+JfcGsNTEpExoiqD9yRVwtm6c=; 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=dzKimrhcJ7VGilt1K2CLkLE4DN6Mi9B+4K+RxmeKUsztxWBsM0AOP1uJOzyTpL3lW 2lcrKwwQ0Y6wCQ4VJ0tr7sUKfflGjSG0wvUtCQ8gcjly5/61qi7V3vsT8O/Xw/2sI/ +BZJMQ//yZBiu9HgI78N7aGyN70CVNXTO4NOuxOshsfliKxMr4Q55uNm3Ou8zbuloC HigB6JN3HG/5lrpLn2yI+SW6CyYdDO45+ToT4AlWoLpDKwqXtYJDXP/k1aQLRGYX0h 4ZCDNT+gP+A+c7IftiqB+5Rjvzdx3el9eUNktRL75cnryU0LbzQ7uN/Hssm3c3kKWT X11jTqS5vkstg== In-Reply-To: <15bf5d5d-bd41-15db-750c-251342eef026@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:256008 Archived-At: On Saturday, February 18th, 2023 at 16:45, Dmitry Gutov = wrote: > On 18/02/2023 22:42, Randy Taylor wrote: >=20 > > Thanks, I think this is actually a lot cleaner than the gazillion queri= es we had. > > It looks good barring a few issues I've noticed. > >=20 > > use a::b::{self as ab, A as abc}; > >=20 > > A should be highlighted as a type. > > If abc is Abc, Abc should be highlighted as a type. > >=20 > > use std::Fs as Self_fs; > >=20 > > Self_fs should be highlighted as a type. > >=20 > > I only quickly tested, but re-adding these queries: > > `((use_as_clause alias: (identifier) @font-lock-type-face) (:match "^[A= -Z]" @font-lock-type-face)) ((use_as_clause path: (identifier) @font-lock-t= ype-face) (:match "^[A-Z]" @font-lock-type-face))` > >=20 > > fixes it. Otherwise, I haven't noticed anything else amiss for the type= s feature. >=20 >=20 > Thanks for testing. See the revised patch. Fix one bug, introduce another ;). 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. For example: ``` use deeply::nested::function as other_function; ``` function should not have any face applied to it. ``` use a::b::{C, d, e::F, g::h::I, g::h::i}; ``` i should not have any face applied to it. Only if they are capitalized should we give them a face: font-lock-type-fac= e. As it stands now, they are all font-lock-constant-face. The previous patch was perfect except for the missing use_as_clause queries= - if I add those back, I think everything is good unless I'm missing somet= hing. >=20 > > The variable feature is highlighting some things incorrectly (it was be= fore too, but I think it's a little worse now). > > Adding these to rust-ts-mode--variable-p takes care of the issues that = I see. > > `((equal "extern_crate_declaration" parent-type) nil) ((equal "lifetime= " parent-type) nil) ((equal "scoped_type_identifier" parent-type) nil) ((eq= ual "use_as_clause" parent-type) nil) ((equal "use_list" parent-type) nil)` >=20 >=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) (field_initializer value: (identifier) @font-lock-variable-name-face) 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 ;).