IntelliJ IDEA Scala plugin has a feature for automatically adding :Unit
to the end of unit-returning functions. So, for example, if I'm writing a side-effecting function foo
:
def foo() {}
when I hit Enter
while the cursor is between the braces, I'll get the following:
def foo():Unit = {
}
I, personally, prefer the following instead:
def foo() {
}
So, how do I turn this feature off?
tldr;
Preferences > Code Style > Scala > Other > Uncheck: Enforce procedure syntax [blah blah blah]
Preferences
dialogCode Style
Scala
Other
Enforce procedure syntax for methods with Unit return type
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With