mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -04:00
highlights(c_sharp): lots of improvements
This commit is contained in:
parent
8e53e706e5
commit
7e40537769
1 changed files with 37 additions and 12 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue