Scalafmt v2.4.0-RC1
Edition 2020-01
Line breaks
Allow breaks after assignment
Preserve line breaks before single-line comments when bin-packing
Breaks within a method call if a long single-line comment follows
Preserve single-line formatting for if/try: fixed issues #271 #1002 #1043
Fix formatting for lambda functions in infix expressions:
Avoid line-too-long in lambda functions:
Rewrite rules
- Abide by "no-format" tags when rewriting
- Fix rewrite rules for infix expressions
- Fix newline handling while rewriting, such as to preserve config-style formatting
Fixes
#271 #1002 #1043 #1413 #1506 #1547 #1592 #1624 #1631 #1633
Pull Requests
- Enable to download and run snapshot version from dynamic (#1656) @tanishiking
- Scalafmt bugfix: restore .format signatures while passing filename (#1654) @kitbellew
- Router bugfix: break on else, indent for block within case (#1652) @kitbellew
- Policy: always pass sourcecode.Line implicitly (#1651) @kitbellew
- State/FormatWriter: various optimizations and simplifications (#1647) @kitbellew
- SortModifiers: Use .syntax on tokens, not tree (#1649) @kitbellew
- RedundantBraces: fix various bugs with general expressions (#1635) @kitbellew
- Rewrite: rewrite patchsets unless any is no-format (#1625) @kitbellew
- Add headers for each invidiual editor that Metals supports. (#1629) @olafurpg
- add in a bit of documentation about Metals (#1617) @ckipp01
- FormatOps: check "new anonymous" in infix indent (#1626) @kitbellew
- Router bugfix: improve optimal token for assign (#1623) @kitbellew
- Router: preserve single-line formatting for if/try (#1560) @kitbellew
- FormatOps: consider comment for RHS optimal token (#1604) @kitbellew
- Don't silence stdout when it is the only output (#1622) @sideshowcoder
- Router bugfix: keep single-line comment split (#1614) @kitbellew
- Some performance optimizations for FormatToken (#1616) @kitbellew
- Various refactoring and simplification commits (#1615) @kitbellew
- Various bugfixes for single-arg apply of a lambda (#1612) @kitbellew
- Router: dangle only if breaking in multi-line lambda (#1600) @kitbellew
- FormatOps: allow break after assign in infixSplit (#1608) @kitbellew
Dependency updates
- Update paradise to 2.1.1 (#1620) @scala-steward
- Update sbt-native-packager to 1.6.1 (#1658) @scala-steward
- Update sbt-scalafmt to 2.3.1 (#1657) @scala-steward
- Update sbt-mdoc to 2.1.1 (#1621) @scala-steward
- Update interface to 0.0.17 (#1650) @scala-steward
- Update sbt-scalajs to 0.6.32 (#1642) @scala-steward
- Update sbt-native-packager to 1.6.0 (#1641) @scala-steward
- Update scalatags to 0.8.4 (#1636) @scala-steward
- Update sbt to 1.3.7 (#1634) @scala-steward
- Update scalatags to 0.8.3 (#1619) @scala-steward
- Update sbt to 1.3.6 (#1610) @scala-steward
- Update sbt-ci-release to 1.5.0 (#1613) @scala-steward
- Update sbt-mdoc to 2.1.0 (#1611) @scala-steward
- Update sbt to 1.3.5 (#1601) @scala-steward
- Update scalacheck to 1.14.3 (#1602) @scala-steward
- Update sbt-native-packager to 1.5.2 (#1598) @scala-steward
- Update scalafmt-core to 2.3.2 (#1597) @scala-steward
- Update sbt-scalafmt to 2.3.0 (#1596) @scala-steward





