diff options
| author | Luxed <devildead13@gmail.com> | 2021-06-02 18:16:12 -0400 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-06-04 23:56:26 +0200 |
| commit | 7e40537769c112c2fbaff60f32251623dac902c6 (patch) | |
| tree | 50b3057aef94edf777b358f6e3cfc9269851a07e /queries/c_sharp | |
| parent | JSX components with capital first letter highlighted as constructor rather th... (diff) | |
| download | nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.tar nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.tar.gz nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.tar.bz2 nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.tar.lz nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.tar.xz nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.tar.zst nvim-treesitter-7e40537769c112c2fbaff60f32251623dac902c6.zip | |
highlights(c_sharp): lots of improvements
Diffstat (limited to 'queries/c_sharp')
| -rw-r--r-- | queries/c_sharp/highlights.scm | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/queries/c_sharp/highlights.scm b/queries/c_sharp/highlights.scm index 69292a254..637e30e00 100644 --- a/queries/c_sharp/highlights.scm +++ b/queries/c_sharp/highlights.scm @@ -9,28 +9,31 @@ (interpolation) @none (invocation_expression - (member_access_expression - name: (identifier) @method)) + (member_access_expression + name: (identifier) @method)) + +(invocation_expression + function: (conditional_access_expression + (member_binding_expression + name: (identifier) @method))) (namespace_declaration name: [(qualified_name) (identifier)] @namespace) -((member_access_expression - (identifier) @type - (_) .) - (#match? @type "^[A-Z].*[a-z]")) - (qualified_name (identifier) @type) (invocation_expression (identifier) @method) -((identifier) @field - (#match? @field "^_")) +(field_declaration + (variable_declaration + (variable_declarator + (identifier) @field))) -((identifier) @field - (#match? @field "^m_")) +(initializer_expression + (assignment_expression + left: (identifier) @field)) (parameter_list (parameter @@ -56,10 +59,11 @@ [ (predefined_type) - (implicit_type) (void_keyword) ] @type.builtin +(implicit_type) @keyword + (comment) @comment (using_directive @@ -68,6 +72,12 @@ (property_declaration name: (identifier) @property) +(property_declaration + type: (identifier) @type) + +(nullable_type + (identifier) @type) + (catch_declaration type: (identifier) @type) @@ -88,15 +98,29 @@ (generic_name (identifier) @type) +(invocation_expression + (member_access_expression + (generic_name + (identifier) @method))) + (base_list (identifier) @type) (type_argument_list (identifier) @type) +(type_parameter_list + (type_parameter) @type) + +(type_parameter_constraints_clause + target: (identifier) @type) + (attribute name: (identifier) @attribute) +(for_each_statement + type: (identifier) @type) + [ "if" "else" @@ -228,5 +252,6 @@ "struct" "get" "set" + "where" ] @keyword |
