package org.scalafmt.config

import metaconfig._

@DeriveConfDecoder
case class SortSettings(
    order: Vector[SortSettings.ModKey]
)

object SortSettings {

  implicit val SortSettingsModKeyReader: ConfDecoder[ModKey] =
    ReaderUtil.oneOfIgnoreBackticks[ModKey](
      `implicit`,
      `final`,
      `sealed`,
      `abstract`,
      `override`,
      `private`,
      `protected`,
      `lazy`
    )

  val defaultOrder: Vector[ModKey] =
    Vector(
      `implicit`,
      //
      `final`,
      `sealed`,
      `abstract`,
      //
      `override`,
      //
      `private`,
      `protected`,
      //
      `lazy`
    )

  def default: SortSettings =
    SortSettings(defaultOrder)

  sealed trait ModKey

  case object `private` extends ModKey
  case object `protected` extends ModKey
  case object `final` extends ModKey
  case object `sealed` extends ModKey
  case object `abstract` extends ModKey
  case object `implicit` extends ModKey
  case object `override` extends ModKey
  case object `lazy` extends ModKey
}

package org.scalafmt.config

import metaconfig._

@DeriveConfDecoder
case class SortSettings(
    order: Vector[SortSettings.ModKey]
)

object SortSettings {

  implicit val SortSettingsModKeyReader: ConfDecoder[ModKey] =
    ReaderUtil.oneOfIgnoreBackticks[ModKey](
      `implicit`,
      `final`,
      `sealed`,
      `abstract`,
      `override`,
      `private`,
      `protected`,
      `lazy`,
    )

  val defaultOrder: Vector[ModKey] =
    Vector(
      `implicit`,
      //
      `final`,
      `sealed`,
      `abstract`,
      //
      `override`,
      //
      `private`,
      `protected`,
      //
      `lazy`,
    )

  def default: SortSettings =
    SortSettings(defaultOrder)

  sealed trait ModKey

  case object `private` extends ModKey
  case object `protected` extends ModKey
  case object `final` extends ModKey
  case object `sealed` extends ModKey
  case object `abstract` extends ModKey
  case object `implicit` extends ModKey
  case object `override` extends ModKey
  case object `lazy` extends ModKey
}

--- 
+++ 
@@ -18,7 +18,7 @@
       `override`,
       `private`,
       `protected`,
-      `lazy`,
+      `lazy`
     )
 
   val defaultOrder: Vector[ModKey] =
@@ -34,7 +34,7 @@
       `private`,
       `protected`,
       //
-      `lazy`,
+      `lazy`
     )
 
   def default: SortSettings =
Fix compilation error for scala 2.11
