Add rainbows.scm queries

Co-authored-by: SoraTenshi <dream@neoncity.dev>
pull/2857/head
Michael Davis 2 years ago
parent 780f141a75
commit aa21bafaac
No known key found for this signature in database

@ -0,0 +1,20 @@
[
(function_definition)
(compound_statement)
(subshell)
(test_command)
(subscript)
(parenthesized_expression)
(array)
(expansion)
(command_substitution)
] @rainbow.scope
[
"(" ")"
"((" "))"
"${" "$("
"{" "}"
"[" "]"
"[[" "]]"
] @rainbow.bracket

@ -0,0 +1,29 @@
[
(preproc_params)
(preproc_defined)
(argument_list)
(attribute_specifier)
(ms_declspec_modifier)
(declaration_list)
(parenthesized_declarator)
(parenthesized_expression)
(abstract_parenthesized_declarator)
(array_declarator)
(compound_statement)
(initializer_list)
(compound_literal_expression)
(enumerator_list)
(field_declaration_list)
(parameter_list)
(for_statement)
(macro_type_specifier)
(subscript_expression)
(subscript_designator)
(cast_expression)
] @rainbow.scope
[
"(" ")"
"{" "}"
"[" "]"
] @rainbow.bracket

@ -0,0 +1,13 @@
[
(list_lit)
(map_lit)
(vec_lit)
(anon_fn_lit)
] @rainbow.scope
[
"(" ")"
"#"
"{" "}"
"[" "]"
] @rainbow.bracket

@ -0,0 +1,49 @@
[
; c
(preproc_params)
(preproc_defined)
(argument_list)
(attribute_specifier)
(ms_declspec_modifier)
(declaration_list)
(parenthesized_declarator)
(parenthesized_expression)
(abstract_parenthesized_declarator)
(array_declarator)
(compound_statement)
(initializer_list)
(compound_literal_expression)
(enumerator_list)
(field_declaration_list)
(parameter_list)
(for_statement)
; (macro_type_specifier) - not part of cpp
(subscript_expression)
(subscript_designator)
(cast_expression)
; cpp
(decltype)
(explicit_function_specifier)
(template_parameter_list)
(template_argument_list)
(parameter_list)
(argument_list)
(structured_binding_declarator)
(noexcept)
(throw_specifier)
(static_assert_declaration)
(condition_clause)
(for_range_loop)
(new_declarator)
(delete_expression "[" "]")
(lambda_capture_specifier)
(sizeof_expression)
] @rainbow.scope
[
"(" ")"
"{" "}"
"[" "]"
"<" ">"
] @rainbow.bracket

@ -0,0 +1,15 @@
[
(keyframe_block_list)
(block)
(attribute_selector)
(feature_query)
(parenthesized_query)
(selector_query)
(parenthesized_value)
(arguments)
] @rainbow.scope
[
"{" "}"
"(" ")"
] @rainbow.bracket

@ -0,0 +1,28 @@
[
(export_clause)
(named_imports)
(statement_block)
(for_statement)
(for_in_statement)
(switch_body)
(catch_clause "(" ")")
(parenthesized_expression)
(object)
(object_pattern)
(array)
(array_pattern)
(subscript_expression)
(template_substitution)
(arguments)
(class_body)
(formal_parameters)
(computed_property_name)
] @rainbow.scope
[
"(" ")"
"${" "{" "}"
"[" "]"
] @rainbow.bracket
(regex "/" @rainbow.bracket) @rainbow.scope

@ -0,0 +1,24 @@
[
(block)
(interpolation)
(list)
(tuple)
(bitstring)
(map)
; short-hand function captures like &(&1 + &2)
(unary_operator
operator: "&")
(arguments "(" ")")
(access_call)
(sigil)
] @rainbow.scope
[
"(" ")"
"%"
"{" "}"
"[" "]"
"<<" ">>"
"#{"
"|"
] @rainbow.bracket

@ -0,0 +1,24 @@
[
; ()
(arguments "(" ")")
(parenthesized_expression)
(function_type)
; #{}
(record)
(map)
; {}
(map_update)
(tuple)
; <<>>
(bitstring)
; []
(list)
] @rainbow.scope
[
"#"
"{" "}"
"(" ")"
"[" "]"
"<<" ">>"
] @rainbow.bracket

@ -0,0 +1,32 @@
[
(target_group)
(unqualified_imports)
(tuple)
(list)
(function)
(function_parameters)
(todo)
(tuple)
(list)
(anonymous_function)
(block)
(case)
(record_update)
(arguments)
(record_pattern_arguments)
(tuple_pattern)
(list_pattern)
(type_definition)
(data_constructor_arguments)
(tuple_type)
(function_parameter_types)
(type_arguments)
(type_parameters)
] @rainbow.scope
[
"(" ")"
"[" "]"
"{" "}"
"#"
] @rainbow.bracket

@ -0,0 +1,33 @@
[
(import_spec_list)
(const_declaration)
(var_declaration)
(type_parameter_list)
(parameter_list)
(type_declaration)
(parenthesized_type)
(type_arguments)
(array_type)
(implicit_length_array_type)
(slice_type)
(field_declaration_list)
(interface_type)
(map_type)
(block)
(expression_switch_statement)
(type_switch_statement)
(select_statement)
(parenthesized_expression)
(argument_list)
(index_expression)
(slice_expression)
(type_assertion_expression)
(type_conversion_expression)
(literal_value)
] @rainbow.scope
[
"(" ")"
"[" "]"
"{" "}"
] @rainbow.bracket

@ -0,0 +1,13 @@
[
(doctype)
(erroneous_end_tag)
] @rainbow.scope
([
(element)
(script_element)
(style_element)
] @rainbow.scope
(#set! rainbow.include-children))
["<" ">" "<!" "</" "/>"] @rainbow.bracket

@ -0,0 +1,35 @@
[
(cast_expression)
(inferred_parameters)
(dimensions_expr)
(parenthesized_expression)
(array_access)
(argument_list)
(type_arguments)
(dimensions)
(block)
(switch_block)
(catch_clause)
(resource_specification)
(for_statement)
(enhanced_for_statement)
(annotation_argument_list)
(element_value_array_initializer)
(module_body)
(enum_body)
(type_parameters)
(class_body)
(constructor_body)
(annotation_type_body)
(annotation_type_element_declaration)
(interface_body)
(array_initializer)
(formal_parameters)
] @rainbow.scope
[
"(" ")"
"{" "}"
"[" "]"
"<" ">"
] @rainbow.bracket

@ -0,0 +1,9 @@
[
(object)
(array)
] @rainbow.scope
[
"[" "]"
"{" "}"
] @rainbow.bracket

@ -0,0 +1,9 @@
; inherits: ecma
[
(jsx_expression)
] @rainbow.scope
(jsx_opening_element ["<" ">"] @rainbow.bracket) @rainbow.scope
(jsx_closing_element ["</" ">"] @rainbow.bracket) @rainbow.scope
(jsx_self_closing_element ["<" "/>"] @rainbow.bracket) @rainbow.scope

@ -0,0 +1,17 @@
[
(formals)
(parenthesized_expression)
(attrset_expression)
(let_attrset_expression)
(rec_attrset_expression)
(inherit_from)
(interpolation)
(list_expression)
] @rainbow.scope
[
"${"
"{" "}"
"(" ")"
"[" "]"
] @rainbow.bracket

@ -0,0 +1,28 @@
[
(future_import_statement)
(import_from_statement)
(with_clause)
(parameters)
(parenthesized_list_splat)
(argument_list)
(tuple_pattern)
(list_pattern)
(subscript)
(list)
(set)
(tuple)
(dictionary)
(dictionary_comprehension)
(set_comprehension)
(list_comprehension)
(generator_expression)
(parenthesized_expression)
(interpolation)
(format_expression)
] @rainbow.scope
[
"(" ")"
"{" "}"
"[" "]"
] @rainbow.bracket

@ -0,0 +1,17 @@
[
(lookahead_assertion)
(character_class)
(anonymous_capturing_group)
(named_capturing_group)
(non_capturing_group)
(count_quantifier)
(character_class_escape)
] @rainbow.scope
[
"(?" "(?:"
"(?<" ">"
"(" ")"
"[" "]"
"{" "}"
] @rainbow.bracket

@ -0,0 +1,28 @@
[
(begin_block)
(end_block)
(singleton_method)
(block_parameters)
(parenthesized_statements)
(element_reference)
(argument_list "(" ")")
(block)
(destructured_left_assignment)
(interpolation)
(string_array)
(symbol_array)
(regex)
(array)
(hash)
(method_parameters)
] @rainbow.scope
[
"#{"
"{" "}"
"(" ")"
"%w(" "%i("
"[" "]"
"|"
"/"
] @rainbow.bracket

@ -0,0 +1,60 @@
[
; {/}
(declaration_list)
(field_declaration_list)
(field_initializer_list)
(enum_variant_list)
(block)
(match_block)
(use_list)
(struct_pattern)
; (/)
(ordered_field_declaration_list)
(arguments)
(parameters)
(tuple_type)
(tuple_expression)
(tuple_pattern)
(tuple_struct_pattern)
(unit_type)
(unit_expression)
(visibility_modifier)
(parenthesized_expression)
(token_repetition_pattern)
; </>
(type_parameters)
(type_arguments)
(bracketed_type)
(for_lifetimes)
; [/]
(array_type)
(array_expression)
(index_expression)
(slice_pattern)
; attributes #[]
(attribute_item)
(inner_attribute_item)
; macros
(token_tree_pattern)
(macro_definition)
; closures
(closure_parameters)
] @rainbow.scope
; attributes like `#[serde(rename_all = "kebab-case")]`
(attribute arguments: (token_tree) @rainbow.scope)
[
"#"
"[" "]"
"(" ")"
"{" "}"
"<" ">"
"|"
] @rainbow.bracket

@ -0,0 +1,12 @@
[
(list)
(vector)
(byte_vector)
] @rainbow.scope
[
"#(" "#vu8("
"(" ")"
"[" "]"
"{" "}"
] @rainbow.bracket

@ -0,0 +1,3 @@
; inherits: css
(parameters) @rainbow.scope

@ -0,0 +1,12 @@
[
(table_array_element)
(table)
(array)
(inline_table)
] @rainbow.scope
[
"[[" "]]"
"[" "]"
"{" "}"
] @rainbow.bracket

@ -0,0 +1,12 @@
[
(group)
(named_node)
(wildcard_node)
(predicate)
(alternation)
] @rainbow.scope
[
"(" ")"
"[" "]"
] @rainbow.bracket

@ -0,0 +1,2 @@
; inherits: typescript
; inherits: jsx

@ -0,0 +1,19 @@
; inherits: ecma
[
(import_require_clause)
(enum_body)
(lookup_type)
(parenthesized_type)
(object_type)
(type_parameters)
(index_signature)
(array_type)
(tuple_type)
] @rainbow.scope
(type_arguments ["<" ">"] @rainbow.bracket) @rainbow.scope
[
"{|" "|}"
] @rainbow.bracket

@ -0,0 +1,29 @@
[
(processing_instructions)
(cdata_sect)
(xml_decl)
(doctype_decl)
(element_decl)
(element_choice)
(element_seq)
(mixed)
(attlist_decl)
(notation_type)
(enumeration)
(ge_decl)
(pe_decl)
(notation_decl)
] @rainbow.scope
((element) @rainbow.scope
(#set! rainbow.include-children))
[
"<?" "?>"
"<" ">"
"</" "/>"
"<!"
"(" ")"
")*"
"[" "]"
] @rainbow.bracket

@ -0,0 +1,9 @@
[
(flow_sequence)
(flow_mapping)
] @rainbow.scope
[
"[" "]"
"{" "}"
] @rainbow.bracket

@ -0,0 +1,42 @@
[
; zig
(ArrayTypeStart)
; using ()
(AsmExpr)
(AsmOutputItem)
(ByteAlign)
(CallConv)
(ContainerDeclType)
(ErrorSetDecl)
(FnCallArguments)
(ForPrefix)
(GroupedExpr)
(IfPrefix)
(ParamDeclList)
(SwitchExpr)
(WhileContinueExpr)
(WhilePrefix)
; for align expressions
(PtrTypeStart)
; using {}
(Block)
(BlockExpr)
(FormatSequence)
(InitList)
; using []
(SliceTypeStart)
(SuffixOp)
; zig uses || for captures
(Payload "|" @rainbow.bracket)
(PtrPayload "|" @rainbow.bracket)
(PtrIndexPayload "|" @rainbow.bracket)
] @rainbow.scope
[
"(" ")"
"{" "}"
"[" "]"
] @rainbow.bracket
Loading…
Cancel
Save