GNU bug report logs - #78130
[PATCH] 31.0.50; csharp-ts-mode does not highlight generic types correctly everywhere

Previous Next

Package: emacs;

Reported by: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Date: Tue, 29 Apr 2025 09:53:02 UTC

Severity: normal

Tags: patch

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 78130 <at> debbugs.gnu.org (full text, mbox):

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: 78130 <at> debbugs.gnu.org
Cc: Yuan Fu <casouri <at> gmail.com>
Subject: Re: bug#78130: Acknowledgement ([PATCH] 31.0.50; csharp-ts-mode does
 not highlight generic types correctly everywhere)
Date: Tue, 29 Apr 2025 21:51:54 +0200
[Message part 1 (text/plain, inline)]
Attached is a better patch, which addresses a lot of different areas of C# fontification.

Overall I think these are pure improvements:

- fontification of generic types with namespace-prefixes
- function-call parameters
- variable use in string interpolation
- implicitly typed parameters in lambda-expressions
- index-expressions
- variables used in return-statements
- variables used in binary expressions

What might warrant some review is the use of the (:match) selector to identify local variables (as opposed to properties or types) for a more consistent fontification. This is the first time I'm using it, and I see there's some repetition in the implementation... Could this be improved somehow?

Do we have a "emacsy" way or convention to do this which I could have applied, or is it still a bit early wrt treesitter based modes?





—
Kind Regards
Jostein Kjønigsen

> On 29 Apr 2025, at 13:13, Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> wrote:
> 
> Just a FYI: I've uncovered some use-cases which my patch does not address correctly: namely function invocations.
> 
> The bug is still real, but I'll be restructuring my fix and submitting when I think I have something which works better.
> 
> —
> Kind Regards
> Jostein Kjønigsen
> 
>> On 29 Apr 2025, at 11:53, GNU bug Tracking System <help-debbugs <at> gnu.org> wrote:
>> 
>> Thank you for filing a new bug report with debbugs.gnu.org.
>> 
>> This is an automatically generated reply to let you know your message
>> has been received.
>> 
>> Your message is being forwarded to the package maintainers and other
>> interested parties for their attention; they will reply in due course.
>> 
>> Your message has been sent to the package maintainer(s):
>> bug-gnu-emacs <at> gnu.org
>> 
>> If you wish to submit further information on this problem, please
>> send it to 78130 <at> debbugs.gnu.org.
>> 
>> Please do not send mail to help-debbugs <at> gnu.org unless you wish
>> to report a problem with the Bug-tracking system.
>> 
>> -- 
>> 78130: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78130
>> GNU Bug Tracking System
>> Contact help-debbugs <at> gnu.org with problems
> 

[Message part 2 (text/html, inline)]
[0001-csharp-mode.el-Improve-csharp-ts-mode-fontification.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]

This bug report was last modified 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.