Subject: bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties

From: Dmitry Gutov <[email-masked]>
Date: Wed, 15 Feb 2023 00:14:22 +0200

On 14/02/2023 14:39, Randy Taylor wrote:
> On Tuesday, February 14th, 2023 at 06:42, Jostein Kjønigsen 
> <[email-masked]> wrote:
>>Haven  given the latest patch a try on a less macro-ridden codebase I have to 
> say it looks a lot better. In general I would say for this other 
> code-base it looks favourable to rust-mode.
>>
>>If  there's one thing which still seems to be done better in rust-mode 
> (not nitpicking the variable highlighting), it would be fully namespaces 
> function calls within classes.
>>
>>Consider the following code:
>>
>>extern crate claxon;
>>let result = claxon::FlacReader::open(path);
>>
>>While  rust-ts-mode correctly identifies that open() is a function-call, 
> rust-mode correctly identified FlacReader as a class.
> 
> Thanks for testing. I've attached a patch fixing this.
> 
> I had deleted a query I thought was now covered :). I look forward to 
> the day we have highlight tests!

Thank you, looks almost perfect (see below), I've pushed that to emacs-29.

Highlighting tests are a pain to write, but the initiative is always 
welcome. ;-) In the meantime, at least tree-sitter validates the 
queries, which lowers the odds of typos in font-lock rules.

Speaking of a problem, the solution with applying the explicit 'default' 
face doesn't seem ideal. Aside from the redundancy in the resulting 
buffer structure (with very little practical downside), it also makes 
the 'vc-diff' buffers look like this on the attached screenshots (the 
'default' face's background overrides the greens and reds).

I couldn't find a quick solution to this problem, so I pushed the 
existing code for now.