arnetheduck / nph

An opinionated code formatter for Nim
Other
77 stars 12 forks source link

Add trailing comma at end of any long list (fixes #57) #63

Closed arnetheduck closed 4 months ago

arnetheduck commented 4 months ago

Previously we'd add a trailing comma only for complex lists - however, when a simple list takes up multiple lines, the trailing comma is also useful (similar to how prettier does it).

Incidentally, this also helps put a trailing comma in simple lists that nonetheless only have one item per line.