Incorporate query improvements from nvim-treesitter
The folks over at `nvim-treesitter` have kindly made some improvements
to the highlight queries to address a few gaps. By adding them here, we
can ensure that everyone benefits!
+[ "." ";" ":" "," ] @punctuation.delimiter
+[ "\\(" "(" ")" "[" "]" "{" "}"] @punctuation.bracket ; TODO: "\\(" ")" in interpolations should be @punctuation.special
+
; Identifiers
(attribute) @variable
(simple_identifier) @variable
(inheritance_modifier)
] @keyword
-(function_declaration (simple_identifier) @function.method)
+(function_declaration (simple_identifier) @method)
(function_declaration ["init" @constructor])
(throws) @keyword
(async) @keyword
(inheritance_constraint (identifier (simple_identifier) @parameter))
(equality_constraint (identifier (simple_identifier) @parameter))
-["typealias" "struct" "class" "enum" "protocol" "extension"] @keyword
+[
+ "typealias"
+ "struct"
+ "class"
+ "enum"
+ "protocol"
+ "extension"
+ "indirect"
+] @keyword
(class_body (property_declaration (value_binding_pattern (non_binding_pattern (simple_identifier) @property))))
(protocol_property_declaration (value_binding_pattern (non_binding_pattern (simple_identifier) @property)))
(switch_entry ["fallthrough" @keyword])
(switch_entry (default_keyword) @keyword)
"return" @keyword.return
+(ternary_expression
+ ["?" ":"] @conditional)
["do" (throw_keyword) (catch_keyword)] @keyword
"%="
"!="
"!=="
+ "=="
"==="
+ "??"
+
+ "->"
+
+ "..<"
+ "..."
] @operator
+
