mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
feat(swift): improve highlights
This commit is contained in:
parent
1a4116aef1
commit
add1864bbf
1 changed files with 8 additions and 1 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
(property_modifier)
|
(property_modifier)
|
||||||
(parameter_modifier)
|
(parameter_modifier)
|
||||||
(inheritance_modifier)
|
(inheritance_modifier)
|
||||||
|
(mutation_modifier)
|
||||||
] @type.qualifier
|
] @type.qualifier
|
||||||
|
|
||||||
(function_declaration (simple_identifier) @method)
|
(function_declaration (simple_identifier) @method)
|
||||||
|
|
@ -59,6 +60,10 @@
|
||||||
|
|
||||||
(class_body (property_declaration (pattern (simple_identifier) @property)))
|
(class_body (property_declaration (pattern (simple_identifier) @property)))
|
||||||
(protocol_property_declaration (pattern (simple_identifier) @property))
|
(protocol_property_declaration (pattern (simple_identifier) @property))
|
||||||
|
(navigation_expression
|
||||||
|
(navigation_suffix (simple_identifier) @property))
|
||||||
|
(value_argument
|
||||||
|
name: (simple_identifier) @property)
|
||||||
|
|
||||||
(import_declaration ["import" @include])
|
(import_declaration ["import" @include])
|
||||||
|
|
||||||
|
|
@ -69,6 +74,8 @@
|
||||||
(call_expression ; foo.bar.baz(): highlight the baz()
|
(call_expression ; foo.bar.baz(): highlight the baz()
|
||||||
(navigation_expression
|
(navigation_expression
|
||||||
(navigation_suffix (simple_identifier) @function.call)))
|
(navigation_suffix (simple_identifier) @function.call)))
|
||||||
|
(call_expression
|
||||||
|
(prefix_expression (simple_identifier) @function.call)) ; .foo()
|
||||||
((navigation_expression
|
((navigation_expression
|
||||||
(simple_identifier) @type) ; SomeType.method(): highlight SomeType as a type
|
(simple_identifier) @type) ; SomeType.method(): highlight SomeType as a type
|
||||||
(#lua-match? @type "^[A-Z]"))
|
(#lua-match? @type "^[A-Z]"))
|
||||||
|
|
@ -148,7 +155,6 @@
|
||||||
"try"
|
"try"
|
||||||
"try?"
|
"try?"
|
||||||
"try!"
|
"try!"
|
||||||
"!"
|
|
||||||
"+"
|
"+"
|
||||||
"-"
|
"-"
|
||||||
"*"
|
"*"
|
||||||
|
|
@ -178,4 +184,5 @@
|
||||||
|
|
||||||
"..<"
|
"..<"
|
||||||
"..."
|
"..."
|
||||||
|
(bang)
|
||||||
] @operator
|
] @operator
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue