Last active
October 6, 2024 15:40
-
-
Save kubukoz/95dc1abd3f5bc028b95a3927d73c4698 to your computer and use it in GitHub Desktop.
How to disable significant indentation in Scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runner.dialect = scala3 | |
runner.dialectOverride.allowSignificantIndentation = false | |
# allows `if x then y` | |
runner.dialectOverride.allowQuietSyntax = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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