From 26b96d3503bc83980126da03166d1c1376574724 Mon Sep 17 00:00:00 2001 From: Johannes Rudolph Date: Tue, 8 Jul 2014 14:57:32 +0200 Subject: apply scalariform --- project/ScalariformSupport.scala | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 project/ScalariformSupport.scala (limited to 'project/ScalariformSupport.scala') diff --git a/project/ScalariformSupport.scala b/project/ScalariformSupport.scala new file mode 100644 index 0000000..665a9e6 --- /dev/null +++ b/project/ScalariformSupport.scala @@ -0,0 +1,20 @@ +import sbt._ + +import com.typesafe.sbt.SbtScalariform +import com.typesafe.sbt.SbtScalariform.ScalariformKeys + +object ScalariformSupport { + lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq( + ScalariformKeys.preferences in Compile := formattingPreferences, + ScalariformKeys.preferences in Test := formattingPreferences + ) + + import scalariform.formatter.preferences._ + def formattingPreferences = + FormattingPreferences() + .setPreference(RewriteArrowSymbols, true) + .setPreference(AlignParameters, true) + .setPreference(AlignSingleLineCaseStatements, true) + .setPreference(DoubleIndentClassDeclaration, true) + +} -- cgit v1.2.3