Skip to content

Commit 61ae99e

Browse files
committed
Good state
The modification of another query finally solves the indentation problem. This query was dubious, because annotations are a series of `(annot_atom)`, which most of the time fit on one line. We still want to indent them, so we should have indented the whole series instead of each node individually - which this commit is doing. Also, the `multi_line_scop_only` is useless because if the annotation is single line then the indentation just doesn't have any effect. Still, I found that removing it is necessary to get the right behavior, this I don't understand.
1 parent 48ce8d8 commit 61ae99e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

topiary-queries/queries/nickel.scm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,7 @@
391391
; Indent the annotations themselves in multi-line mode with respect to the
392392
; identifier they annotate.
393393
(
394-
(#multi_line_scope_only! "annotations")
395-
(annot_atom) @prepend_indent_start @append_indent_end
394+
(annot) @prepend_indent_start @append_indent_end
396395
)
397396

398397
; Indent the RHS of the let-binding in presence of annotations.

0 commit comments

Comments
 (0)