mirror of
https://github.com/helix-editor/helix
synced 2026-08-04 02:12:59 +02:00
Replaces the tail/all ancestor-sum walk with "indent = number of @indent scopes containing the line". Brace-less bodies use a new `scope "header"` annotation, the dead tail/all scope annotations are removed from the indent queries.
41 lines
572 B
Scheme
41 lines
572 B
Scheme
[
|
|
(struct_definition)
|
|
(macro_definition)
|
|
(function_definition)
|
|
(compound_statement)
|
|
(if_statement)
|
|
(try_statement)
|
|
(for_statement)
|
|
(while_statement)
|
|
(let_statement)
|
|
(quote_statement)
|
|
(do_clause)
|
|
(assignment)
|
|
(for_binding)
|
|
(call_expression)
|
|
(parenthesized_expression)
|
|
(tuple_expression)
|
|
(comprehension_expression)
|
|
(matrix_expression)
|
|
(vector_expression)
|
|
] @indent
|
|
|
|
[
|
|
"end"
|
|
")"
|
|
"]"
|
|
"}"
|
|
"else"
|
|
"elseif"
|
|
"catch"
|
|
"finally"
|
|
] @outdent
|
|
|
|
(argument_list
|
|
. (_) @anchor
|
|
) @align
|
|
|
|
(curly_expression
|
|
. (_) @anchor
|
|
) @align
|