Skip to content

v3.0.0

Compare
Choose a tag to compare
@kitbellew kitbellew released this 19 Aug 01:52

Scala 3

This release is first and foremost about Scala 3 support. This complex project took the better of the year and is the brainchild of @tgodzik, with substantial contributions on the parser end from @dos65 , @michalbednarz and @kpbochenek .

How to use:

Configurable indentation

We have added a number of options to control indentation.

Scaladoc and markdown

We have added support for fenced code blocks in scaladoc (within .scala files) and also markdown (.md) files. The scala embedded within those fenced blocks will be formatted.

Additionally, one can set a different line size for wrapping scaladoc.

Blanks around top-level statements

Import rewrites

We have introduced a new imports rewrite rule, which replaced and expanded upon all existing rules.

Binpacking

While binpacking is still highly experimental, we have made improvements to the algorithm to avoid blowing up due to a high number of options to consider.

Also, a new Oneline option for binpacking is available to binpack only parameters/arguments which fit on a single line. The result is more readable and also faster to format.

Newlines before open parens in definitions or calls

Normally, we'd add line breaks after an opening parenthesis in a method definition or method call, both using default formatting and the so-called vertical multiline.

Now we have added support for formatting method definitions (and, for scala 3 only, method calls) by
breaking before the opening parenthesis.

Additional controls for line breaks