From 870825e0e81ffd22ecf0f6a6b55f84af05906c0b Mon Sep 17 00:00:00 2001 From: Steve Vermeulen Date: Sun, 19 Jul 2020 12:52:50 -0700 Subject: [PATCH] Added more highlight groups to C# file --- queries/c_sharp/highlights.scm | 71 +++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/queries/c_sharp/highlights.scm b/queries/c_sharp/highlights.scm index b929a0f45..8d9ae585e 100644 --- a/queries/c_sharp/highlights.scm +++ b/queries/c_sharp/highlights.scm @@ -2,6 +2,12 @@ (method_declaration name: (identifier) @method) +((identifier) @field + (#match? @field "^_")) + +((identifier) @field + (#match? @field "^m_")) + (parameter_list (parameter name: (identifier) @parameter)) @@ -36,6 +42,9 @@ (qualified_name (identifier) @type)) +(property_declaration + name: (identifier) @property) + (interface_declaration name: (identifier) @type) (class_declaration @@ -43,13 +52,21 @@ (enum_declaration name: (identifier) @type) (constructor_declaration - name: (identifier) @type) + name: (identifier) @constructor) + (variable_declaration (identifier) @type) - (object_creation_expression (identifier) @type) +(variable_declaration + (generic_name + (identifier) @type)) +(object_creation_expression + (generic_name + (identifier) @type)) + + (attribute name: (identifier) @attribute) @@ -66,6 +83,7 @@ "do" "continue" "break" + "in" "goto" "foreach" ] @repeat @@ -77,6 +95,45 @@ "finally" ] @exception +[ + "+" + "?" + ":" + "++" + "-" + "--" + "&" + "&&" + "|" + "||" + "!" + "!=" + "==" + "*" + "/" + "%" + "<" + "<=" + ">" + ">=" + "=" + "-=" + "+=" + "*=" + "/=" + "%=" + "^" + "^=" + "&=" + "|=" + "~" + ">>" + "<<" + "<<=" + ">>=" + "=>" +] @operator + [ ";" "." @@ -91,10 +148,20 @@ "}" "(" ")" + "<" + ">" ] @punctuation.bracket +[ + (this_expression) + (base_expression) +] @variable.builtin + [ "using" +] @include + +[ "lock" "params" "ref"