diff --git a/runtime/queries/c-sharp/rainbows.scm b/runtime/queries/c-sharp/rainbows.scm new file mode 100644 index 00000000..e9896a79 --- /dev/null +++ b/runtime/queries/c-sharp/rainbows.scm @@ -0,0 +1,58 @@ +[ + (accessor_list) + (anonymous_object_creation_expression) + (argument_list) + (array_rank_specifier) + (attribute_argument_list) + (attribute_list) + (block) + (bracketed_argument_list) + (bracketed_parameter_list) + (calling_convention) + (cast_expression) + (catch_declaration) + (catch_filter_clause) + (checked_expression) + (collection_expression) + (declaration_list) + (default_expression) + (do_statement) + (enum_member_declaration_list) + (fixed_statement) + (global_attribute) + (if_statement) + (implicit_array_creation_expression) + (implicit_stackalloc_expression) + (initializer_expression) + (list_pattern) + (lock_statement) + (makeref_expression) + (parameter_list) + (parenthesized_expression) + (parenthesized_pattern) + (parenthesized_variable_designation) + (positional_pattern_clause) + (preproc_line) + (property_pattern_clause) + (reftype_expression) + (refvalue_expression) + (sizeof_expression) + (switch_body) + (switch_statement) + (tuple_expression) + (tuple_pattern) + (tuple_type) + (type_parameter_constraint) + (typeof_expression) + (using_statement) + (while_statement) +] @rainbow.scope + +(type_argument_list ["<" ">"] @rainbow.bracket) @rainbow.scope +(type_parameter_list ["<" ">"] @rainbow.bracket) @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/cmake/rainbows.scm b/runtime/queries/cmake/rainbows.scm new file mode 100644 index 00000000..93304f80 --- /dev/null +++ b/runtime/queries/cmake/rainbows.scm @@ -0,0 +1,13 @@ +[ + (endfunction_command) + (endif_command) + (function_command) + (if_command) + (normal_command) + (normal_var) +] @rainbow.scope + +[ + "(" ")" + "{" "}" +] @rainbow.bracket diff --git a/runtime/queries/crystal/rainbows.scm b/runtime/queries/crystal/rainbows.scm new file mode 100644 index 00000000..21fb56d3 --- /dev/null +++ b/runtime/queries/crystal/rainbows.scm @@ -0,0 +1,31 @@ +[ + (alignof) + (array) + (asm) + (asm_operand) + (fun_def) + (generic_instance_type) + (generic_type) + (hash) + (index_call) + (instance_alignof) + (instance_sizeof) + (macro_var) + (method_proc) + (named_tuple) + (named_tuple_type) + (offsetof) + (pointerof) + (proc) + (sizeof) + (static_array_type) + (tuple) + (tuple_type) + (typeof) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/elm/rainbows.scm b/runtime/queries/elm/rainbows.scm new file mode 100644 index 00000000..8d833151 --- /dev/null +++ b/runtime/queries/elm/rainbows.scm @@ -0,0 +1,14 @@ +[ + (exposing_list) + (list_expr) + (parenthesized_expr) + (record_expr) + (record_type) + (tuple_expr) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/fsharp/rainbows.scm b/runtime/queries/fsharp/rainbows.scm new file mode 100644 index 00000000..570419fe --- /dev/null +++ b/runtime/queries/fsharp/rainbows.scm @@ -0,0 +1,12 @@ +[ + (brace_expression) + (list_expression) + (paren_expression) + (record_type_defn) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/graphql/rainbows.scm b/runtime/queries/graphql/rainbows.scm new file mode 100644 index 00000000..4c6c200b --- /dev/null +++ b/runtime/queries/graphql/rainbows.scm @@ -0,0 +1,13 @@ +[ + (arguments) + (arguments_definition) + (fields_definition) + (list_type) + (selection_set) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/groovy/rainbows.scm b/runtime/queries/groovy/rainbows.scm new file mode 100644 index 00000000..1042956c --- /dev/null +++ b/runtime/queries/groovy/rainbows.scm @@ -0,0 +1,24 @@ +[ + (argument_list) + (closure) + (do_while_loop) + (for_in_loop) + (for_parameters) + (if_statement) + (index) + (interpolation) + (list) + (map) + (map_item) + (parameter_list) + (switch_block) + (switch_statement) + (try_statement) + (while_loop) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/haskell/rainbows.scm b/runtime/queries/haskell/rainbows.scm new file mode 100644 index 00000000..5a318ef9 --- /dev/null +++ b/runtime/queries/haskell/rainbows.scm @@ -0,0 +1,13 @@ +[ + (fields) + (list) + (parens) + (record) + (tuple) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/hcl/rainbows.scm b/runtime/queries/hcl/rainbows.scm new file mode 100644 index 00000000..9d0733f5 --- /dev/null +++ b/runtime/queries/hcl/rainbows.scm @@ -0,0 +1,16 @@ +; HCL splits its delimiters into start/end nodes (block_start `{` / block_end +; `}`, object_start/end, tuple_start/end), so the brackets aren't direct +; children of the block/object/tuple that nests — scope those wrapping nodes +; with rainbow.include-children so the nested delimiters still highlight. +((block) @rainbow.scope (#set! rainbow.include-children)) +((object) @rainbow.scope (#set! rainbow.include-children)) +((tuple) @rainbow.scope (#set! rainbow.include-children)) + +; A function call's parens are direct children, so no include-children needed. +(function_call) @rainbow.scope + +[ + "{" "}" + "[" "]" + "(" ")" +] @rainbow.bracket diff --git a/runtime/queries/julia/rainbows.scm b/runtime/queries/julia/rainbows.scm new file mode 100644 index 00000000..61fbb57a --- /dev/null +++ b/runtime/queries/julia/rainbows.scm @@ -0,0 +1,13 @@ +[ + (argument_list) + (curly_expression) + (parenthesized_expression) + (tuple_expression) + (vector_expression) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/kotlin/rainbows.scm b/runtime/queries/kotlin/rainbows.scm new file mode 100644 index 00000000..37ab1f0a --- /dev/null +++ b/runtime/queries/kotlin/rainbows.scm @@ -0,0 +1,34 @@ +[ + (catch_block) + (class_body) + (collection_literal) + (delegation_specifier) + (do_while_statement) + (enum_class_body) + (file_annotation) + (for_statement) + (function_type_parameters) + (function_value_parameters) + (getter) + (if_expression) + (indexing_suffix) + (lambda_literal) + (multi_variable_declaration) + (parenthesized_expression) + (parenthesized_type) + (parenthesized_user_type) + (setter) + (value_arguments) + (when_expression) + (when_subject) + (while_statement) +] @rainbow.scope + +(type_arguments ["<" ">"] @rainbow.bracket) @rainbow.scope +(type_parameters ["<" ">"] @rainbow.bracket) @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/nim/rainbows.scm b/runtime/queries/nim/rainbows.scm new file mode 100644 index 00000000..f16ab96f --- /dev/null +++ b/runtime/queries/nim/rainbows.scm @@ -0,0 +1,20 @@ +[ + (array_construction) + (bracket_expression) + (cast) + (curly_construction) + (curly_expression) + (generic_parameter_list) + (parameter_declaration_list) + (parenthesized) + (term_rewriting_pattern) + (tuple_construction) + (tuple_deconstruct_declaration) + (typeof) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/ocaml/rainbows.scm b/runtime/queries/ocaml/rainbows.scm new file mode 100644 index 00000000..c1176778 --- /dev/null +++ b/runtime/queries/ocaml/rainbows.scm @@ -0,0 +1,13 @@ +[ + (list_expression) + (parenthesized_expression) + (parenthesized_pattern) + (record_declaration) + (record_expression) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/perl/rainbows.scm b/runtime/queries/perl/rainbows.scm new file mode 100644 index 00000000..6247c536 --- /dev/null +++ b/runtime/queries/perl/rainbows.scm @@ -0,0 +1,14 @@ +[ + (array_element_expression) + (assignment_expression) + (block) + (function_call_expression) + (hash_element_expression) + (variable_declaration) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/powershell/rainbows.scm b/runtime/queries/powershell/rainbows.scm new file mode 100644 index 00000000..9d99bc2e --- /dev/null +++ b/runtime/queries/powershell/rainbows.scm @@ -0,0 +1,31 @@ +[ + (argument_list) + (array_type_name) + (attribute) + (class_method_definition) + (class_statement) + (do_statement) + (element_access) + (elseif_clause) + (enum_statement) + (for_statement) + (foreach_statement) + (function_parameter_declaration) + (function_statement) + (generic_type_name) + (if_statement) + (param_block) + (parenthesized_expression) + (script_block_expression) + (statement_block) + (switch_body) + (switch_condition) + (type_literal) + (while_statement) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/scala/rainbows.scm b/runtime/queries/scala/rainbows.scm new file mode 100644 index 00000000..89d973ad --- /dev/null +++ b/runtime/queries/scala/rainbows.scm @@ -0,0 +1,34 @@ +[ + (access_qualifier) + (arguments) + (bindings) + (block) + (case_block) + (case_class_pattern) + (class_parameters) + (enum_body) + (for_expression) + (match_type) + (named_tuple_pattern) + (named_tuple_type) + (namespace_selectors) + (parameter_types) + (parameters) + (parenthesized_expression) + (quote_expression) + (splice_expression) + (tuple_expression) + (tuple_pattern) + (tuple_type) + (type_arguments) + (type_lambda) + (type_parameters) + (unit) + (with_template_body) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/solidity/rainbows.scm b/runtime/queries/solidity/rainbows.scm new file mode 100644 index 00000000..a2097179 --- /dev/null +++ b/runtime/queries/solidity/rainbows.scm @@ -0,0 +1,35 @@ +[ + (array_access) + (assembly_flags) + (assembly_statement) + (block_statement) + (call_argument) + (contract_body) + (do_while_statement) + (enum_body) + (error_declaration) + (for_statement) + (function_body) + (if_statement) + (inline_array_expression) + (meta_type_expression) + (override_specifier) + (parenthesized_expression) + (slice_access) + (struct_body) + (struct_expression) + (tuple_expression) + (using_directive) + (variable_declaration_tuple) + (while_statement) + (yul_block) + (yul_function_call) + (yul_function_definition) + (yul_variable_declaration) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/sql/rainbows.scm b/runtime/queries/sql/rainbows.scm new file mode 100644 index 00000000..9acaba03 --- /dev/null +++ b/runtime/queries/sql/rainbows.scm @@ -0,0 +1,13 @@ +[ + (parenthesized_expression) + (subquery) + (list) + (function_arguments) + (cast) + (window_specification) +] @rainbow.scope + +[ + "(" ")" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/vim/rainbows.scm b/runtime/queries/vim/rainbows.scm new file mode 100644 index 00000000..f31ee94e --- /dev/null +++ b/runtime/queries/vim/rainbows.scm @@ -0,0 +1,14 @@ +[ + (call_expression) + (dictionnary) + (if_statement) + (index_expression) + (list) + (parameters) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket diff --git a/runtime/queries/zig/rainbows.scm b/runtime/queries/zig/rainbows.scm new file mode 100644 index 00000000..0dfa78fd --- /dev/null +++ b/runtime/queries/zig/rainbows.scm @@ -0,0 +1,30 @@ +[ + (address_space) + (arguments) + (array_type) + (asm_expression) + (asm_input_item) + (asm_output_item) + (block) + (byte_alignment) + (calling_convention) + (enum_declaration) + (error_set_declaration) + (index_expression) + (initializer_list) + (link_section) + (opaque_declaration) + (parameters) + (parenthesized_expression) + (pointer_type) + (slice_type) + (struct_declaration) + (switch_expression) + (union_declaration) +] @rainbow.scope + +[ + "(" ")" + "{" "}" + "[" "]" +] @rainbow.bracket