diff options
| author | Steve Vermeulen <sfvermeulen@gmail.com> | 2020-07-19 12:52:50 -0700 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-07-20 23:19:18 +0200 |
| commit | 870825e0e81ffd22ecf0f6a6b55f84af05906c0b (patch) | |
| tree | 14523fe2df5884a1c4afdea0027998b6ce03305b /queries | |
| parent | Added first attempt at highlighting and text objects for csharp (diff) | |
| download | nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.tar nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.tar.gz nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.tar.bz2 nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.tar.lz nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.tar.xz nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.tar.zst nvim-treesitter-870825e0e81ffd22ecf0f6a6b55f84af05906c0b.zip | |
Added more highlight groups to C# file
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/c_sharp/highlights.scm | 71 |
1 files 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 @@ -78,6 +96,45 @@ ] @exception [ + "+" + "?" + ":" + "++" + "-" + "--" + "&" + "&&" + "|" + "||" + "!" + "!=" + "==" + "*" + "/" + "%" + "<" + "<=" + ">" + ">=" + "=" + "-=" + "+=" + "*=" + "/=" + "%=" + "^" + "^=" + "&=" + "|=" + "~" + ">>" + "<<" + "<<=" + ">>=" + "=>" +] @operator + +[ ";" "." "," @@ -91,10 +148,20 @@ "}" "(" ")" + "<" + ">" ] @punctuation.bracket [ + (this_expression) + (base_expression) +] @variable.builtin + +[ "using" +] @include + +[ "lock" "params" "ref" |
