aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Ordaz <ordazsgustavo@gmail.com>2023-08-12 12:14:53 +0200
committerAmaan Qureshi <amaanq12@gmail.com>2023-08-18 04:48:40 -0400
commitadd1864bbf2d3b8e789ec6b4715bb5a4073e3b60 (patch)
treec233591a2ee21ef25081caf5c3522bce66560cd0
parentci: update workflows (diff)
downloadnvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.tar
nvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.tar.gz
nvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.tar.bz2
nvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.tar.lz
nvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.tar.xz
nvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.tar.zst
nvim-treesitter-add1864bbf2d3b8e789ec6b4715bb5a4073e3b60.zip
feat(swift): improve highlights
-rw-r--r--queries/swift/highlights.scm9
1 files changed, 8 insertions, 1 deletions
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