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

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

bug#59897: 29.0.60; csharp-ts-mode: variable-name fontified as method wh


From: Theodor Thornhill
Subject: bug#59897: 29.0.60; csharp-ts-mode: variable-name fontified as method when invoking method with generic type-argument.
Date: Thu, 08 Dec 2022 11:12:54 +0100

Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:

> When I use the new csharp-ts-mode, method fontification is usually accurate 
> with only 1 exception which I have
> encountered so far:
>
> When calling methods on objects, and that method accepts a generic 
> type-argument. You typically see this in
> Startup.cs-like files in ASP.Net Core projects:
>
> services.AddSomeExtensionWithoutTypeArguments();
> services.AddSomeExtensionWithTypeArguments<MyType>();
>
> In the above cases we see that fontification of "services" differs.
>
> For the first line, services is fontified using font-lock-variable-name-face 
> (correct), but in the latter case services
> is fontified using font-lock-function-name-face (incorrect).
>
> In both cases I expected services to be fontified using 
> font-lock-variable-name-face.
>

Can you test this patch, Jostein, and if you're happy, please install,
Yuan :-)

BTW, I think the ruleset is getting pretty gnarly in csharp-mode, so
maybe we should consider slimming it down a little (without losing
granularity) for perf reasons down the line!

Theo


Attachment: 0001-Add-expression-for-generic_name-in-csharp-ts-mode.patch
Description: Text Data


reply via email to

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