You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or, depending on how uniform these node types are, separate rules for each...which is probably more likely, as those node types will presumably need fine-tuning formatting of their own. For example, adding the space between the keyword, etc. and the block.
I think the case for an "antiline" makes sense when the grammar is very regular, with a handful of exceptions. Your Java example might fit that pattern, so it's worth thinking about, but how I describe above may make for more tractable queries...
Hi all,
First of all: Topiary is great!
I'm currently experimenting with formatting java with topiary and I miss something similar to https://topiary.tweag.io/book/reference/capture-names/horizontal-spacing.html?highlight=anti#append_antispace--prepend_antispace but for vertical spacing.
My use case: I want all
block
-s to be formatted like this:Like we used to format blocks in java: with newline after closing brace. As usual when there is general rule there is also exception:
It would be very handy to express general rule as:
and then enumerate exceptions which doesn't have trailing newline:
Without this I have to enumerate every possible combination of parent<->block and apply rules individually.
The text was updated successfully, but these errors were encountered: