vim-scala icon indicating copy to clipboard operation
vim-scala copied to clipboard

Case indentation persists after pattern match block ends

Open nathantchan opened this issue 9 years ago • 1 comments

It seems like the indenter does not recognize when a match expression closes, and so case classes declared afterward are indented to the same level as the case statements in the match block:

object Hello {

foo match {
  case "bar" => true
  case _ => false
}   

  case class Goodbye(
    flag: Boolean
  ) 
} 

nathantchan avatar May 12 '16 15:05 nathantchan

Yeah this bugs me too but it's been a real pain to fix. A PR would be extremely welcome ;) On Thu, May 12, 2016 at 11:52 AM nathantchan [email protected] wrote:

It seems like the indenter does not recognize when a match expression closes, and so case classes declared afterward are indented to the same level as the case statements in the match block:

object Hello {

foo match { case "bar" => true case _ => false }

case class Goodbye( flag: Boolean ) }

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/derekwyatt/vim-scala/issues/126

derekwyatt avatar May 12 '16 15:05 derekwyatt