IntelliJ - How to force named parameters in Scala editor and add them

532 Views Asked by At

Basically I want the IDE to enforce named parameters syntax when it is auto-completing

https://docs.scala-lang.org/style/method-invocation.html

So for example a given class

class MyClass {
  def myMethod( param1 : String, param2 : String)
}

I want the IDE to put the placeholders for "param1" and "param2" like this:

val myObj = new MyClass()
myObj.myMethod( param1 = "value of param 1", param2 = "value of param2")

AND NOT (This is bad)

myObj.myMethod("calling the method without explicitly naming param1" , "calling the method without explicitly naming param2")
0

There are 0 best solutions below