forked from Mirrors/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
461 B
Scheme
33 lines
461 B
Scheme
2 years ago
|
; queries for helix to do automatic indentation upon hitting enter
|
||
|
; TODO: needs more work, cover more cases
|
||
|
[
|
||
|
(entity)
|
||
|
(method)
|
||
|
(behavior)
|
||
|
(constructor)
|
||
|
(block)
|
||
|
(tuple)
|
||
|
(grouped)
|
||
|
] @indent
|
||
|
(match_case body: (block) @indent)
|
||
|
; ffi_call and call
|
||
|
(_ arguments: (_) @indent)
|
||
|
(assignment right: (_) @indent
|
||
|
(#set! "scope" "all")
|
||
|
)
|
||
|
|
||
|
[
|
||
|
(params)
|
||
|
(object)
|
||
|
("if")
|
||
|
] @extend
|
||
|
(lambda params: (_) @extend)
|
||
|
|
||
|
[
|
||
|
"end"
|
||
|
"}"
|
||
|
"]"
|
||
|
")"
|
||
|
"|"
|
||
|
] @outdent
|