-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Router: for scala3, move NL before macro to after #3199
Conversation
@@ -2599,6 +2599,13 @@ class Router(formatOps: FormatOps) { | |||
case ft @ FormatToken(_: T.Comment, _, _) if ft.hasBreak => | |||
splitsAsNewlines(splits) | |||
case ft if ft.meta.formatOff && ft.hasBreak => splitsAsNewlines(splits) | |||
case FormatToken(_: T.Equals, r: T.KwMacro, _) | |||
if dialect.allowInlineMods => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tgodzik not sure if this is the right way to identify scala 3, perhaps as good as any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use allowSignificantIndentation
, because it's the cause of the issue. Without significant indentation there would be no issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment, otherwise LGTM
@@ -2599,6 +2599,13 @@ class Router(formatOps: FormatOps) { | |||
case ft @ FormatToken(_: T.Comment, _, _) if ft.hasBreak => | |||
splitsAsNewlines(splits) | |||
case ft if ft.meta.formatOff && ft.hasBreak => splitsAsNewlines(splits) | |||
case FormatToken(_: T.Equals, r: T.KwMacro, _) | |||
if dialect.allowInlineMods => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use allowSignificantIndentation
, because it's the cause of the issue. Without significant indentation there would be no issues
Done. |
Fixes #3188.