Skip to content

Instantly share code, notes, and snippets.

@kubukoz
Last active September 14, 2024 04:45
Show Gist options
  • Save kubukoz/95dc1abd3f5bc028b95a3927d73c4698 to your computer and use it in GitHub Desktop.
Save kubukoz/95dc1abd3f5bc028b95a3927d73c4698 to your computer and use it in GitHub Desktop.
How to disable significant indentation in Scala
runner.dialect = scala3
runner.dialectOverride.allowSignificantIndentation = false
# allows `if x then y`
runner.dialectOverride.allowQuietSyntax = true
// in sbt
scalacOptions += "-no-indent"
// in scala-cli
//> using option -no-indent
// in mill
def scalacOptions = Seq("-no-indent")
// if you already have indented code and want to make it braceful, use these instead:
// in sbt
scalacOptions ++= Seq("-no-indent", "-rewrite")
// in scala-cli
//> using options -no-indent -rewrite
// in mill
def scalacOptions = Seq("-no-indent", "-rewrite")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment