[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum
From: |
Yuan Fu |
Subject: |
bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum |
Date: |
Thu, 7 Mar 2024 20:43:51 -0800 |
X-Debug-CC: dev@rjt.dev <mailto:dev@rjt.dev>
(I lied a little bit about on the [PATCH] part: I have a solution but didn’t
turn it into a patch yet.)
The problem is follows: given the rust code below, some enum are not fontified
with type face under font lock level 3, and those enum are fontified as
function or variable under font lock level 4.
fn main() {
func(MyEnum::VariantA(0));
func(MyEnum::VariantB);
func(VariantC);
func(VariantD(0));
}
VariantA and VariantB are fontified correctly, but VariantC and VariantD are
not.
I think a simple rule that fontifies every capitalized identifier would fix
this. But I don’t know if that’ll create other problem. AFAIK capitalized
identifier is always some type in rust, right?
This is first reported on rust-mode’s GitHub repo:
https://github.com/rust-lang/rust-mode/issues/518
Yuan
- bug#69625: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum,
Yuan Fu <=