# How can I configure elm-format (v 0.18) and vscode elm package to format my code using 8 spaces?

**URL:** <https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006>\
**Category:** Learn\
**Created:** [September 19, 2018, 9:07am UTC](https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006 "2018-09-19T09:07:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevotionGeo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/devotiongeo/32/3558_2.png) [@DevotionGeo](https://discourse.elm-lang.org/u/DevotionGeo)\
**Post date:** [September 19, 2018, 9:07am UTC](https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006/1 "2018-09-19T09:07:30Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![pdamoc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/pdamoc/32/36_2.png) [@pdamoc](https://discourse.elm-lang.org/u/pdamoc)\
**Post date:** [September 19, 2018, 10:11am UTC](https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006/2 "2018-09-19T10:11:14Z")

</div>

You can’t.

`elm-format` takes no configuration options and this is intentional.

---

<div class="post-metadata">

**Author:** ![DevotionGeo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/devotiongeo/32/3558_2.png) [@DevotionGeo](https://discourse.elm-lang.org/u/DevotionGeo)\
**Post date:** [September 19, 2018, 10:49am UTC](https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006/3 "2018-09-19T10:49:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Brian\_Carroll](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/brian_carroll/32/444_2.png) [@Brian\_Carroll](https://discourse.elm-lang.org/u/Brian_Carroll)\
**Post date:** [September 19, 2018, 11:54am UTC](https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006/4 "2018-09-19T11:54:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [September 29, 2018, 11:58am UTC](https://discourse.elm-lang.org/t/how-can-i-configure-elm-format-v-0-18-and-vscode-elm-package-to-format-my-code-using-8-spaces/2006/5 "2018-09-29T11:58:15Z")

</div>

Closed on September 29, 2018, 11:58am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
