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

From: Dmitry Gutov <[email-masked]>
Date: Thu, 16 Feb 2023 03:53:12 +0200

On 15/02/2023 04:07, Randy Taylor wrote:
> Basically what we have here are general scoped_identifier queries that we want to apply only to the actual code (i.e. not imports). However, these scoped_identifiers also exist in the imports and the same highlighting semantics don't apply there, so we have specific queries for the different kinds of imports that specify how they want their scoped_identifier stuff highlighted.

The only option I've been thinking of (and described in some related 
report), is to replace the face name with a highlighter in Lisp.

See rust-ts-mode--fontify-pattern as an example of such function.

But the new one will need to check that the parent is 
'scoped_identifier', and the grandparent is not a 'call_expression' 
node, or 'use_as_clause', or 'use_declaration', etc, and the name itself 
is lowercase -- when so, skip highlighting. And highlight with one of 
the two faces when otherwise.

Shouldn't be too hard to do, but I'm wary about the additional cost at 
runtime.