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#74277: 29.4; rust-ts-mode doesn't highlight some function calls Date: Fri, 22 Nov 2024 03:30:05 +0000 Message-ID: References: <86bjyookld.fsf@gnu.org> <87r077kl0n.fsf@gmail.com> <87ed3522aj.fsf@gmail.com> 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="6525"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Eli Zaretskii , 74277@debbugs.gnu.org, acidbong@tilde.club To: Trevor Arjeski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 22 04:31:41 2024 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 1tEKOS-0001ZI-RN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Nov 2024 04:31:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEKOE-0002jm-JK; Thu, 21 Nov 2024 22:31:26 -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 1tEKNq-0002i1-Oo for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 22:31:11 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEKNq-0006lg-Gu for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 22:31:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=YaIhUq40vJD35TUtDyuEtqm+z01+FnA9yFs7kTZ//Nk=; b=hHY3I9Qqi6FTvVTUa9mjZ3pn7wSmOre3hNIhbIS2IMruTOr09S2McooGpOpfvEZZJQjqzek/jzB4CMPE7IG21WLJim8ySGbgQNEaMkvfVvh70Qy0tD3PlrJ9dTVCyJ18btSVtXOIvLe26po/5su2Y2Uw0i+DI8TdUppZ7Sy4RQmEYaRVqFx7LqGDUmfRaNHuJoKl76fbN1466jAB1khqLdm2p4hHHB48fObtF0nvXBz0y+SyIzzofLaTxCoyBrz/ygpnlRzTNd7me27Z3HIjqeqT57hZMcFRNRhuGUmG+M0wu50X1mYw1sgszBqh/lrxqXUu1c7ezFYMvv391T4Mgw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEKNq-0008AJ-Aa for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 22:31: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: Fri, 22 Nov 2024 03:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74277 X-GNU-PR-Package: emacs Original-Received: via spool by 74277-submit@debbugs.gnu.org id=B74277.173224621831303 (code B ref 74277); Fri, 22 Nov 2024 03:31:02 +0000 Original-Received: (at 74277) by debbugs.gnu.org; 22 Nov 2024 03:30:18 +0000 Original-Received: from localhost ([127.0.0.1]:52513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEKN7-00088p-Q2 for submit@debbugs.gnu.org; Thu, 21 Nov 2024 22:30:18 -0500 Original-Received: from mail-4018.proton.ch ([185.70.40.18]:22627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEKN5-000877-ET for 74277@debbugs.gnu.org; Thu, 21 Nov 2024 22:30:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev; s=protonmail3; t=1732246209; x=1732505409; bh=YaIhUq40vJD35TUtDyuEtqm+z01+FnA9yFs7kTZ//Nk=; 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:List-Unsubscribe:List-Unsubscribe-Post; b=iU9bA8i6FsvPLuFYqKbBdPwzpl1Z7DvKWolLL+AQSMON9mdkdI923AGr+ZnsW3G8O lzLAlMGnMA6bGYvqWlpuGqlpCKLQ9b7MixfEbY56vD0NAfF9zTKKTllwqpDQgk0YvB gh7yC2lwlCz4HiGO7DV0v+f4jWwYK1VvYsor6xb7KUh4ZjvqXBysjabZSaQj+1splh de+Njzdd6g0RXf7AngFFtt1cNNk/nQiRmr/563aDUGIKr/JFTWS4PWWpTyriJ/y4OS DT/ON6onEM+uM0g5gpJGu5kLnRujF9YgKap6yuiQtXcCkJ/Qp6OAhqhHarirDTHKaG ZuTJ/wQCvaIqw== In-Reply-To: <87ed3522aj.fsf@gmail.com> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 50f1ad47c8e19f0bea1de9446a92842dcbae7d4b 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:295763 Archived-At: On Wednesday, November 20th, 2024 at 13:22, Trevor Arjeski wrote: >=20 > Trevor Arjeski tmarjeski@gmail.com writes: >=20 >=20 > I decided to hack around with this a little bit and found that adding > the following lines partially works: >=20 >=20 > I'm sure there is an issue with solving it this way, I just need someone > else more experienced to confirm. It is finicky where it turns the > highlighting on and off when you make some code changes, for example > adding and removing the semi-colon after the macro invocation. Yuan would be the best to answer that. Personally, I envisioned a custom highlight helper function like rust-ts-mode--fontify-pattern or rust-ts-mode--fontify-scope which seems like the simplest solution that should cover this use case, but I'm not actually aware of all the sorts of craziness one could get up to in a macro invocation so that might not be enough and maybe injections are the way to go. >=20 > Here is some example code to test it against: >=20 > fn foo() -> i32 { >=20 > 4 > } >=20 > fn main() { > println!("{:?}", foo()); > } >=20 >=20 > Thanks