scala-ide / scalariform

Scala source code formatter
http://scala-ide.github.com/scalariform/
MIT License
527 stars 148 forks source link

Feature Request: Mixed single-line and multi-line case statements #252

Closed mjaghouri closed 6 years ago

mjaghouri commented 6 years ago
xxx match {
  case Complex =>
      // needs multiple 
      // lines
  case Other1   => // single line
  case Another2 => // single line
  case Other12  => // single line
}

If there are mixed single-line and multi-line case statements, I would like to align the arrow in the consecutive single lines still. Even with the alignSingleLineCaseStatements option now, it would even un-aligns my single line cases in the above example.

godenji commented 6 years ago

Seems to work in 0.2.4, closing (re-open if I've misunderstood the issue)

xxx match {
  case Complex  =>
  // needs multiple
  // lines
  case Other1   => // single line
  case Another2 => // single line
  case Other12  => // single line
}