Kaita John
Kaita John

Reputation: 1109

How to set up minimalistic indentation and code style in Kotlin

Am finding it hard to work with Kotlin style of indentation, or at least the settings in my editor if that is not Kotlin's default. Code gets spread far too wide and it is hard to read. The image below best illustrates it. This happens anytime I paste new Kotlin code or use Android Studio's Auto Indent shortcut (CTRL + ALT + L). Is there any way to resolve this?

Sample

Upvotes: 0

Views: 1129

Answers (1)

Kaita John
Kaita John

Reputation: 1109

Figured that you have to uncheck Line Breaks option if checked found in: File | Settings | Code Style | Kotlin| Wrapping And Braces | Keep when reformatting | Line Breaks

Upvotes: 1

Related Questions