diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2022-01-16 15:36:02 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-01-18 22:09:21 +0100 |
| commit | cc1890528ffedb37df969d9a7bbc31b5b3d265c3 (patch) | |
| tree | b4c5d17f161fdc4150a67345be767dd3f3ad9914 /queries/swift | |
| parent | highlights(swift): highlight `"->"` as `@operator` (diff) | |
| download | nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.tar nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.tar.gz nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.tar.bz2 nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.tar.lz nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.tar.xz nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.tar.zst nvim-treesitter-cc1890528ffedb37df969d9a7bbc31b5b3d265c3.zip | |
highlights(swift): add more `@operator`s and `implicit` keyword
Diffstat (limited to 'queries/swift')
| -rw-r--r-- | queries/swift/highlights.scm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/queries/swift/highlights.scm b/queries/swift/highlights.scm index 3ce25f0ab..95f38f9ef 100644 --- a/queries/swift/highlights.scm +++ b/queries/swift/highlights.scm @@ -29,7 +29,15 @@ (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))) @@ -69,6 +77,8 @@ (switch_entry ["fallthrough" @keyword]) (switch_entry (default_keyword) @keyword) "return" @keyword.return +(ternary_expression + ["?" ":"] @conditional) ["do" (throw_keyword) (catch_keyword)] @keyword @@ -129,6 +139,12 @@ "%=" "!=" "!==" + "==" "===" + "??" + "->" + + "..<" + "..." ] @operator |
