I use 2 spaces whenever I write some code in Ruby, Go, Elixir, JavaScript (even CSS, SCSS, HTML) etc.
Elm is my first indentation based language. When I saw different code examples, those formatted with 4 spaces makes more sense than those formatted with 2 spaces. I would like to make it clearer by formatting it using 8 spaces. How can I tell elm-format and VSCode elm package to format my code using 8 spaces? (Note: I’m using version 0.18).
I read somewhere that after 0.19 the format will format the code using 2 spaces. I’m worried, because once I upgrade to 0.19, any ‘elm format’ formatted code won’t be readable (for me) anymore.
Not sure where you read that, but I think there must have been some mistake or misunderstanding.
I’ve seen a few discussions here and elsewhere with people who were asking for 2 spaces, and the author of elm-format (@avh4) was basically saying this has been discussed already ages ago. There was a long debate, people expressed strong feelings, all possible arguments in the world were made… and the decision was to make it 4 spaces.
I think some people have forked their own versions to use 2 spaces for their own projects, but that’s it.