mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 09:56:19 +04:00
3e79a35656
Since the tree-sitter grammar is not very good at parsing function calls while they're being written, this is not yet super useful. However, it prevents the new `hybrid` indent heuristic from choosing these lines as a baseline, making it more robust.
42 lines
794 B
Scheme
42 lines
794 B
Scheme
[
|
|
(compound_statement)
|
|
(declaration_list)
|
|
(field_declaration_list)
|
|
(enumerator_list)
|
|
(parameter_list)
|
|
(init_declarator)
|
|
(expression_statement)
|
|
] @indent
|
|
|
|
[
|
|
"case"
|
|
"}"
|
|
"]"
|
|
")"
|
|
] @outdent
|
|
|
|
(if_statement
|
|
consequence: (_) @indent
|
|
(#not-kind-eq? @indent "compound_statement")
|
|
(#set! "scope" "all"))
|
|
(while_statement
|
|
body: (_) @indent
|
|
(#not-kind-eq? @indent "compound_statement")
|
|
(#set! "scope" "all"))
|
|
(do_statement
|
|
body: (_) @indent
|
|
(#not-kind-eq? @indent "compound_statement")
|
|
(#set! "scope" "all"))
|
|
(for_statement
|
|
")"
|
|
(_) @indent
|
|
(#not-kind-eq? @indent "compound_statement")
|
|
(#set! "scope" "all"))
|
|
|
|
(parameter_list
|
|
. (parameter_declaration) @anchor
|
|
(#set! "scope" "tail")) @align
|
|
(argument_list
|
|
. (_) @anchor
|
|
(#set! "scope" "tail")) @align
|