diff --git a/scalafmt-core/shared/src/main/scala/org/scalafmt/config/ScalafmtConfig.scala b/scalafmt-core/shared/src/main/scala/org/scalafmt/config/ScalafmtConfig.scala index fcb1f02a89..e47df746fa 100644 --- a/scalafmt-core/shared/src/main/scala/org/scalafmt/config/ScalafmtConfig.scala +++ b/scalafmt-core/shared/src/main/scala/org/scalafmt/config/ScalafmtConfig.scala @@ -140,7 +140,7 @@ case class ScalafmtConfig( fileOverride: Conf.Obj = Conf.Obj.empty, xmlLiterals: XmlLiterals = XmlLiterals() ) { - lazy val alignMap: Map[String, Seq[AlignToken.Matcher]] = + private[scalafmt] lazy val alignMap: Map[String, Seq[AlignToken.Matcher]] = align.tokens.map(x => x.code -> x).toMap.map { case (k, v) => k -> v.getMatcher } @@ -173,16 +173,16 @@ case class ScalafmtConfig( .getOrElse(this) } - lazy val encloseSelectChains = + private[scalafmt] lazy val encloseSelectChains = optIn.encloseClassicChains || newlines.source.ne(Newlines.classic) - def indentOperatorTopLevelOnly = + private[scalafmt] def indentOperatorTopLevelOnly = indentOperator.topLevelOnly && !unindentTopLevelOperators - lazy val docstringsWrapMaxColumn: Int = + private[scalafmt] lazy val docstringsWrapMaxColumn: Int = docstrings.wrapMaxColumn.getOrElse(maxColumn) - lazy val dialect = runner.getDialect + private[scalafmt] lazy val dialect = runner.getDialect } object ScalafmtConfig { @@ -243,7 +243,7 @@ object ScalafmtConfig { /** Ready styles provided by scalafmt. */ - val activeStyles: Map[String, ScalafmtConfig] = + private val activeStyles: Map[String, ScalafmtConfig] = Map( "Scala.js" -> scalaJs, "IntelliJ" -> intellij @@ -252,13 +252,13 @@ object ScalafmtConfig { defaultWithAlign ) - val availableStyles: Map[String, ScalafmtConfig] = { + private val availableStyles: Map[String, ScalafmtConfig] = { activeStyles ++ LoggerOps.name2style( scalaJs ) }.map { case (k, v) => k.toLowerCase -> v } - def conservativeRunner: ScalafmtRunner = + private[scalafmt] def conservativeRunner: ScalafmtRunner = default.runner.copy( optimizer = default.runner.optimizer.copy( // The tests were not written in this style