From a54d5f500c1a9959b1f87c731aa9ac1b7eed27c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jostein=20Kj=C3=B8nigsen?= Date: Thu, 8 Dec 2022 11:07:15 +0100 Subject: [PATCH] Improve fontification in csharp-ts-mode (bug#59897) Fixes highlighting of generic methods like the one below: instance.MethodWithTypeArguments(...); InClassMethodWithTypeArguments(...); * lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings): Add new rule. --- lisp/progmodes/csharp-mode.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index dfe98cc49e6..2d13ae6930c 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -791,7 +791,15 @@ compilation and evaluation time conflicts." (invocation_expression (identifier) @font-lock-function-name-face) (invocation_expression - (member_access_expression (identifier) @font-lock-function-name-face)) + (member_access_expression + expression: (identifier) @font-lock-variable-name-face)) + (invocation_expression + function: [(generic_name (identifier)) @font-lock-function-name-face + (generic_name (type_argument_list + ["<"] @font-lock-bracket-face + (identifier) @font-lock-type-face + [">"] @font-lock-bracket-face) + )]) (catch_declaration ((identifier) @font-lock-type-face)) -- 2.39.2