arnetheduck / nph

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

the blank line update #10

Closed arnetheduck closed 6 months ago

arnetheduck commented 6 months ago

Based on popular feedback, nph will now retain most empty lines in code as they are often used to signal logical grouping.

Similar to black / prettier and somewhat similar to nimpretty, this PR moves blank line handlng to a "normalisation" strategy where excessive blanks are removed, some blanks are inserted aroound complex statements and user-entered blanks are retained, normalising them to a single line.