I use scalafmt plugin in my project, also I use scalafmt plugin for Intellj in order to format my Scala code.
Usually I use hot keys or run sbt scalafmt to formatting.
sbt.version=1.0.3
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.3.0")
Question: Any advice how can I format code with scalafmt automatically on compile time?