clarinet icon indicating copy to clipboard operation
clarinet copied to clipboard

Add an opinionated formatter

Open obycode opened this issue 3 years ago • 4 comments

It is always useful to have a formatter to fix whitespace and other minor formatting changes in your code. Our VSCode extension should provide a formatter for Clarity files.

obycode avatar Mar 03 '22 18:03 obycode

I believe the main missing component needed to implement this would be maintaining the comments in the AST. There is currently no data structure to hold comments, so they are treated the same as whitespace in the code. If we add a new PreSymbolicExpressionType for comments, then it should be relatively easy to implement a formatter.

obycode avatar Jun 06 '22 17:06 obycode

Related https://github.com/hirosystems/clarinet/pull/664

lgalabru avatar Jan 04 '23 20:01 lgalabru

@hugocaillard to add more detail here.

smcclellan avatar Apr 19 '23 14:04 smcclellan

Update: This will be started either later this quarter (Q3) or start of next.

smcclellan avatar Jul 25 '24 17:07 smcclellan