IntelliJ starts to annoy me more and more with a f...
# intellij
r
IntelliJ starts to annoy me more and more with a feature I don't want. When I refactor things (e.g. rename a method), it happens (not always) that it reformats parts of the code which used the method in some way. Is this a actually a feature I can turn of or should I file a bug? Just an example code might look like this afterwards:
Copy code
class A:
  B {
  fun foo()
    = 
    test()
}
where it looked as follows before
Copy code
class A: B {
  fun foo()
    = test()
}
c
what happens when you just reformat that snippet? does it format it in the same way?
r
most of time not, sometimes it does for instance from
Copy code
fun foo()
  = test()
to
Copy code
fun foo() =
  test()
quite annoying and since 1.2.20 (https://youtrack.jetbrains.com/issue/KT-22444)
c
why do you want the = on the new line? just wondering
r
just personal taste really, I think it reads better. For instance.
Copy code
fun foo() = {
  test()
}
//vs. 
fun foo()
 = { test() }
I prefer the second variant where I see in one place that it returns a lambda. Whereas in the first variant I think first that it is a function with Unit as return type.