mirror of
https://github.com/helix-editor/helix
synced 2026-08-05 02:33:01 +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.
38 lines
385 B
Scheme
38 lines
385 B
Scheme
; See: https://docs.helix-editor.com/guides/indent.html
|
|
|
|
; indent
|
|
; ------
|
|
|
|
[
|
|
; <..., ...>
|
|
(formals)
|
|
(params)
|
|
|
|
; (...| ...)
|
|
(alt)
|
|
] @indent
|
|
|
|
; outdent
|
|
; -------
|
|
|
|
[
|
|
"}"
|
|
")"
|
|
">"
|
|
] @outdent
|
|
|
|
; align
|
|
; -----
|
|
|
|
; | ... | ...
|
|
(rule_body
|
|
. (top_level_term) @anchor
|
|
) @align
|
|
|
|
; N/A or unused:
|
|
; --------------
|
|
; indent.always
|
|
; outdent.always
|
|
; extend
|
|
; extend.prevent-once
|