tweag / topiary

https://topiary.tweag.io/
MIT License
579 stars 29 forks source link

Nickel: formatting of single-line annotated let #768

Closed yannham closed 1 month ago

yannham commented 1 month ago

Respect formatting of single-line annotated let in Nickel

Issue: #743

Description

Previously, we were formatting a let-binding followed by a single-line annotation and some content by always putting the = sign and the following content on a new line, indenting the content one level to the right.

This was mostly due to a limitation of Topiary around scopes. Today, this limitation has been lifted thanks to the introduction of measuring scopes. We make use of the latter to finally format such let-bindings (and bindings in general) as we originally wanted in #743.

Checklist

Checklist before merging: