|
From: | Dmitry Gutov |
Subject: | bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties |
Date: | Thu, 16 Feb 2023 03:53:12 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |