derekwyatt / vim-scala

My work on integration of Scala into Vim - not a ton here, but useful for me.
http://derekwyatt.org
Apache License 2.0
1.09k stars 144 forks source link

Case indentation persists after pattern match block ends #126

Open nathantchan opened 8 years ago

nathantchan commented 8 years ago

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
  ) 
} 
derekwyatt commented 8 years ago

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 notifications@github.com 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