tweag / topiary

https://topiary.tweag.io/
MIT License
511 stars 17 forks source link

allow_blank_line_before is only relative to the input #701

Closed Xophmeister closed 1 month ago

Xophmeister commented 3 months ago
  1. There is no way to force newlines between items. You can allow newlines above something with allow_blank_line_before, but in some cases it could be useful to not only allow it but enforce it?

Originally posted by @lavigneer in https://github.com/tweag/topiary/pull/699

The allow_blank_line_before processing happens before formatting, on the input. If blank lines are subsequently inserted as part of formatting, then they will be squashed by the post-processor.

It would make sense for the post-processor to be sensitive to allow_blank_line_before nodes, so Topiary has a way of inserting horizontal whitespace between nodes.