Is anyone else employing tricks to preserve line b...
# ktfmt
p
Is anyone else employing tricks to preserve line breaks? For long function chains I like the calls arranged vertically and sometimes I'll force it by adding a comment after the function calls. Does anyone have any better ideas?
c
Not really a helpful answer or anything, but I always thought ktfmt specifically prevented the ability to do this kind of thing?
n
What kind of line breaks are you talking about @pardom?
r
I have a similar desire for call chains like:
Copy code
listOf(1, 2, 3)
    .filter { it > 2 } 
    .map { it + 2 }
    .sum()
These will generally be compressed down to one line depending on length, whereas my company's preferred style would be to preserve intentional new lines (which is admittedly against the ideas of the google java formatter).