GNU bug report logs - #74277
29.4; rust-ts-mode doesn't highlight some function calls

Previous Next

Package: emacs;

Reported by: acidbong <at> tilde.club

Date: Sat, 9 Nov 2024 08:22:02 UTC

Severity: normal

Tags: notabug

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 74277 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Trevor Arjeski <tmarjeski <at> gmail.com>
Cc: Randy Taylor <dev <at> rjt.dev>, Eli Zaretskii <eliz <at> gnu.org>,
 74277 <at> debbugs.gnu.org, acidbong <at> tilde.club
Subject: Re: bug#74277: 29.4; rust-ts-mode doesn't highlight some function
 calls
Date: Sun, 24 Nov 2024 23:34:14 -0800

> On Nov 23, 2024, at 11:17 PM, Trevor Arjeski <tmarjeski <at> gmail.com> wrote:
> 
> Yuan Fu <casouri <at> gmail.com> writes:
> 
>>> On Nov 21, 2024, at 7:30 PM, Randy Taylor <dev <at> rjt.dev> wrote:
>>> 
>>> On Wednesday, November 20th, 2024 at 13:22, Trevor Arjeski <tmarjeski <at> gmail.com> wrote:
>>>> 
>>>> Trevor Arjeski tmarjeski <at> gmail.com writes:
>>>> 
>>>> 
>>>> I decided to hack around with this a little bit and found that adding
>>>> the following lines partially works:
>>>> 
>>>> 
>>>> 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.
>> 
>> Using injection (what Emacs calls local parser, same thing) here is fine, I
>> think. As Randy said, tree-sitter doesn’t have a good answer for macros. If nvim
>> uses this workaround (create an injection for the macro and parses it like
>> normal rust code), then it should be fine for us to follow suit.
>> 
> 
> Any ideas why my crude implementation of the injection "flickers" on and
> off after certain changes?
> 
> Thanks,
> Trevor

So, after spending a night on this, it appears to be a tree-sitter bug :( I created an issue here: https://github.com/tree-sitter/tree-sitter/issues/3962

Yuan





This bug report was last modified 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.