scalariform

How to format the sbt build files with scalariform automatically?

点点圈 提交于 2019-12-30 04:16:09
问题 I'd like to format my sbt build files with scalariform. Is it possible to run scalariform on the build definition itself when starting sbt? 回答1: Put this in project/scalariform.sbt : addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.0") And this in scalariform.sbt : import scalariform.formatter.preferences._ import ScalariformKeys._ lazy val BuildConfig = config("build") extend Compile lazy val BuildSbtConfig = config("buildsbt") extend Compile val foo: Int => Int = { case 1 => 1

sbt-scalariform plugin - can't resolve settings

♀尐吖头ヾ 提交于 2019-12-08 12:20:49
问题 I wanted to integrate scalariform tool into SBT . Following the https://github.com/sbt/sbt-scalariform/tree/master I created plugins.sbt file with line addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") then I created scalariform.sbt file with scalariformSettings Here I am stuck, when I try to run SBT for my project I am getting scalariform.sbt:1: error: not found: value scalariformSettings I also tried import com.typesafe.sbt.SbtScalariform SbtScalariform.scalariformSettings in

How to format the sbt build files with scalariform automatically?

谁都会走 提交于 2019-11-30 12:09:09
I'd like to format my sbt build files with scalariform. Is it possible to run scalariform on the build definition itself when starting sbt? Put this in project/scalariform.sbt : addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.0") And this in scalariform.sbt : import scalariform.formatter.preferences._ import ScalariformKeys._ lazy val BuildConfig = config("build") extend Compile lazy val BuildSbtConfig = config("buildsbt") extend Compile val foo: Int => Int = { case 1 => 1 case 2 => 2 } noConfigScalariformSettings inConfig(BuildConfig)(configScalariformSettings) inConfig