bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties
Date: Sat, 18 Feb 2023 23:45:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 18/02/2023 22:42, Randy Taylor wrote:
Thanks, I think this is actually a lot cleaner than the gazillion queries we 
had.
It looks good barring a few issues I've noticed.

use a::b::{self as ab, A as abc};

A should be highlighted as a type.
If abc is Abc, Abc should be highlighted as a type.

use std::Fs as Self_fs;

Self_fs should be highlighted as a type.

I only quickly tested, but re-adding these queries:
```
      ((use_as_clause alias: (identifier) @font-lock-type-face)
       (:match "^[A-Z]" @font-lock-type-face))
      ((use_as_clause path: (identifier) @font-lock-type-face)
       (:match "^[A-Z]" @font-lock-type-face))
```

fixes it. Otherwise, I haven't noticed anything else amiss for the types 
feature.

Thanks for testing. See the revised patch.

The variable feature is highlighting some things incorrectly (it was before 
too, but I think it's a little worse now).
Adding these to rust-ts-mode--variable-p takes care of the issues that I see.
```
      ((equal "extern_crate_declaration" parent-type)
       nil)
      ((equal "lifetime" parent-type)
       nil)
      ((equal "scoped_type_identifier" parent-type)
       nil)
      ((equal "use_as_clause" parent-type)
       nil)
      ((equal "use_list" parent-type)
       nil)
```

This should be taken care of by the new approach (enumeration of all allowed parent types).

Attachment: rust-ts-fontify-scope-v3.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]