mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
2e4653ea31
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
40 lines
868 B
Scheme
40 lines
868 B
Scheme
[
|
|
(appexpr ["[" "("]) ; Applications.
|
|
(ntlappexpr ["[" "("])
|
|
(atom ["[" "("]) ; Lists and tuples.
|
|
(program (moduledecl "{")) ; Braced module declarations.
|
|
(funbody)
|
|
(block)
|
|
(handlerexpr)
|
|
(opclausex)
|
|
] @indent
|
|
|
|
[
|
|
(typedecl
|
|
[(typeid) (opdecls)]) ; Avoid matching single-operation effects.
|
|
(externdecl)
|
|
(matchexpr)
|
|
(matchrule)
|
|
|
|
; For ifexprs, branches (once they exist) will contain blocks if they're
|
|
; indented so we just need to make sure the initial indent happens when we're
|
|
; creating them.
|
|
"then"
|
|
"else"
|
|
] @indent @extend
|
|
|
|
(matchrule "->" @indent @extend)
|
|
|
|
; Handling for error recovery.
|
|
(ERROR "fun") @indent @extend
|
|
(ERROR "match") @indent @extend
|
|
(ERROR "->" @indent.always @extend)
|
|
|
|
; Don't outdent on function parameter declarations.
|
|
(atom ")" @outdent @extend.prevent-once)
|
|
|
|
[
|
|
"]"
|
|
"}"
|
|
] @outdent @extend.prevent-once
|