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


View this message in rfc822 format

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: 78130 <at> debbugs.gnu.org
Subject: bug#78130: [PATCH] 31.0.50; csharp-ts-mode does not highlight generic types correctly everywhere
Date: Tue, 29 Apr 2025 11:51:47 +0200
[Message part 1 (text/plain, inline)]
Hey everyone.

When using charp-ts-mode to edit C# files, you often work with generic-types (ie List<string>, etc). csharp-ts-mode has treesitter selectors for this type of syntax, but the current implementation constraints it to only be used in specialized circumstances, when we really want to apply it all over the place.

As an example, generic return-types in function declarations are currently not highlighted correctly.

Attached is a patch which removes this unneeded narrowing of the selector and makes generic types look correct everywhere.

It also corrects a small semantic error (property-use vs variable-use) in initializer-expressions, but I didn't feel like making a separate bug-report for that :)

—
Kind Regards
Jostein Kjønigsen



[Message part 2 (text/html, inline)]
[0001-csharp-mode.el-Fix-fontification-of-generic-types.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.