emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 a54d5f500c 2/2: Improve fontification in csharp-ts-mode (bug#59


From: Yuan Fu
Subject: emacs-29 a54d5f500c 2/2: Improve fontification in csharp-ts-mode (bug#59897)
Date: Wed, 14 Dec 2022 17:31:55 -0500 (EST)

branch: emacs-29
commit a54d5f500c1a9959b1f87c731aa9ac1b7eed27c9
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Yuan Fu <casouri@gmail.com>

    Improve fontification in csharp-ts-mode (bug#59897)
    
    Fixes highlighting of generic methods like the one below:
    
    instance.MethodWithTypeArguments<Type>(...);
    InClassMethodWithTypeArguments<Type>(...);
    
    * 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 dfe98cc49e..2d13ae6930 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))



reply via email to

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