Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--runtime/queries/swift/rainbows.scm60
2 files changed, 61 insertions, 1 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index e4cbe6a0..ee011cf5 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -237,7 +237,7 @@
| supercollider | ✓ | | | | | |
| svelte | ✓ | | ✓ | | | `svelteserver` |
| sway | ✓ | ✓ | ✓ | | | `forc` |
-| swift | ✓ | ✓ | | | | `sourcekit-lsp` |
+| swift | ✓ | ✓ | | | ✓ | `sourcekit-lsp` |
| systemd | ✓ | | | | | `systemd-lsp` |
| t32 | ✓ | | | | | |
| tablegen | ✓ | ✓ | ✓ | | | |
diff --git a/runtime/queries/swift/rainbows.scm b/runtime/queries/swift/rainbows.scm
new file mode 100644
index 00000000..49ede9fc
--- /dev/null
+++ b/runtime/queries/swift/rainbows.scm
@@ -0,0 +1,60 @@
+[
+ (array_literal)
+ (array_type)
+ (attribute)
+ (availability_condition)
+ (call_expression)
+ (call_suffix)
+ (catch_block)
+ (class_body)
+ (class_declaration)
+ (computed_getter)
+ (computed_property)
+ (computed_setter)
+ (dictionary_literal)
+ (dictionary_type)
+ (didset_clause)
+ (do_statement)
+ (enum_class_body)
+ (enum_entry)
+ (enum_type_parameters)
+ (for_statement)
+ (function_body)
+ (function_declaration)
+ (guard_statement)
+ (if_statement)
+ (init_declaration)
+ (lambda_literal)
+ (line_string_literal)
+ (modifiers)
+ (navigation_expression)
+ (optional_type)
+ (pattern)
+ (protocol_body)
+ (protocol_declaration)
+ (protocol_function_declaration)
+ (protocol_property_requirements)
+ (property_declaration)
+ (source_file)
+ (statements)
+ (subscript_declaration)
+ (switch_entry)
+ (switch_pattern)
+ (switch_statement)
+ (tuple_expression)
+ (tuple_type)
+ (tuple_type_item)
+ (type_annotation)
+ (value_arguments)
+ (visibility_modifier)
+ (while_statement)
+ (willset_didset_block)
+] @rainbow.scope
+
+[
+ "(" ")"
+ "[" "]"
+ "{" "}"
+ "<" ">"
+ "\\("
+] @rainbow.bracket