https://kotlinlang.org logo
#compose
Title
# compose
y

Yuriy Kulikov

07/18/2020, 2:28 PM
Do you prefer 2 or 4 spaces for Compose files? Or don't care?
m

Mark Murphy

07/18/2020, 2:43 PM
I do not expect Compose to change anything here. I will be rather surprised if people change indent policies because they happen to be using Compose. IMHO, use whatever your project has standardized on for other reasons, whether it is from an official style guide or something more home-grown.
3
y

Yuriy Kulikov

07/18/2020, 3:15 PM
I prefer 2 spaces for pretty much any language I program with, but many projects use 4 spaces and it is fine for me. Now I am exploring compose and I had an urge to change .editorconfig for the folder with compose files. Now most lines have 8 spaces indentation and I like it more than 16 spaces previously 🙂
j

Javier

07/18/2020, 3:39 PM

https://youtu.be/SsoOG6ZeyUI

y

Yuriy Kulikov

07/18/2020, 3:42 PM
I am not trying to convince anyone, just in case 🙂
z

Zach Klippenstein (he/him) [MOD]

07/19/2020, 5:42 PM
Google has an "official" opinion on this: https://developer.android.com/kotlin/style-guide#indentation