Whenever I am trying to use infix method call, IntelliJ IDEA adds parentheses after method name.
For example:
val xs = List(1,2,3)
If I type xs contai and then press Enter, IntelliJ IDEA completes this expression as follows:
xs contains()
but I expect without parentheses:
xs contains
Is there an option to disable adding parentheses for infix method call?
I use IntelliJ IDEA 12.1 with Scala plugin 0.7.213.
[UPDATED]
The method I want to call is
def contains(elem: Any): Boolean
from scala.collection.immutable.List
The complete expression is xs contains 1
There is no such option, and there is no plans to add it in the future yet. Reason is that it's not infix call, what you want, it's postfix call, and after any postfix call you have to use semicolon or extra line feed. Both things are pretty ugly, that's why in Scala 2.10 you will get warning for postfix calls usages.
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