Otterman
Otterman

Reputation: 530

IntelliJ, Kotlin formatting: force empty blocks to be on one line

My question is very similar to this question however I can't create the same rule set for Kotlin. Kotlin "Code Style" does not have

Simple blocks in one line

Under its "Keep when reformatting" list

How can I keep else -> {} as opposed to

else -> {
}

For Kotlin styling?

-Otterman

Upvotes: 1

Views: 346

Answers (1)

Sergei Dubrov
Sergei Dubrov

Reputation: 56

This feature is not implemented in Kotlin yet.

It is tracked here: https://youtrack.jetbrains.com/issue/KT-12491

Upvotes: 2

Related Questions