From add1864bbf2d3b8e789ec6b4715bb5a4073e3b60 Mon Sep 17 00:00:00 2001 From: Gustavo Ordaz Date: Sat, 12 Aug 2023 12:14:53 +0200 Subject: feat(swift): improve highlights --- queries/swift/highlights.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/queries/swift/highlights.scm b/queries/swift/highlights.scm index 4cdd882a8..b279d026f 100644 --- a/queries/swift/highlights.scm +++ b/queries/swift/highlights.scm @@ -17,6 +17,7 @@ (property_modifier) (parameter_modifier) (inheritance_modifier) + (mutation_modifier) ] @type.qualifier (function_declaration (simple_identifier) @method) @@ -59,6 +60,10 @@ (class_body (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]) @@ -69,6 +74,8 @@ (call_expression ; foo.bar.baz(): highlight the baz() (navigation_expression (navigation_suffix (simple_identifier) @function.call))) +(call_expression + (prefix_expression (simple_identifier) @function.call)) ; .foo() ((navigation_expression (simple_identifier) @type) ; SomeType.method(): highlight SomeType as a type (#lua-match? @type "^[A-Z]")) @@ -148,7 +155,6 @@ "try" "try?" "try!" - "!" "+" "-" "*" @@ -178,4 +184,5 @@ "..<" "..." + (bang) ] @operator -- cgit v1.2.3-70-g09d2