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.
This commit is contained in:
Jostein Kjønigsen 2022-12-08 11:07:15 +01:00 committed by Yuan Fu
parent 3db2f560bb
commit a54d5f500c
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -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))