# Strange autoformatting with vscode

**URL:** https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976
**Category:** VS Code
**Created:** [September 10, 2021, 9:36am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976 "2021-09-10T09:36:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![stroebel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stroebel/32/6774_2.png) [@stroebel](https://discourse.julialang.org/u/stroebel)
#### Post date: [September 10, 2021, 9:36am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976/1 "2021-09-10T09:36:06Z")

</div>

This might be me being an idiot, but why would the the vscode extention insist on formatting this code block as it is?

![image](https://global.discourse-cdn.com/julialang/original/3X/4/4/44155195f66564acb0bf96753849735a97cff6a2.png)

The structs defined above and below are formatted correctly.

---

<div class="post-metadata">

### Author: ![DouglasLivingstone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/douglaslivingstone/32/29025_2.png) [@DouglasLivingstone](https://discourse.julialang.org/u/DouglasLivingstone)
#### Post date: [September 10, 2021, 6:07pm UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976/2 "2021-09-10T18:07:56Z")

</div>

I’ve had that too, couldn’t work out why!

---

<div class="post-metadata">

### Author: ![stroebel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stroebel/32/6774_2.png) [@stroebel](https://discourse.julialang.org/u/stroebel)
#### Post date: [September 13, 2021, 8:51am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976/3 "2021-09-13T08:51:32Z")

</div>

For whomever is debugging this…

![image](https://global.discourse-cdn.com/julialang/original/3X/1/b/1b7419050779c56305f456931ae2a4adceb66584.png)

![image](https://global.discourse-cdn.com/julialang/original/3X/8/8/886eab6ded2c40d97c07ec5816e51bc4e6ae616f.png)

![image](https://global.discourse-cdn.com/julialang/original/3X/b/e/be3fc21d8e2bdfb4e016b6b4ea9b3689ec3345ed.png)

![image](https://global.discourse-cdn.com/julialang/original/3X/e/2/e2a839e1e47140a5f3667549c6984d775091ac79.png)

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [September 13, 2021, 8:52am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976/4 "2021-09-13T08:52:25Z")

</div>

Is this the default indentation when writing code or when actual formatting takes place?

---

<div class="post-metadata">

### Author: ![stroebel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stroebel/32/6774_2.png) [@stroebel](https://discourse.julialang.org/u/stroebel)
#### Post date: [September 13, 2021, 8:53am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976/5 "2021-09-13T08:53:28Z")

</div>

It is when the formatting takes place

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [September 13, 2021, 8:54am UTC](https://discourse.julialang.org/t/strange-autoformatting-with-vscode/67976/6 "2021-09-13T08:54:25Z")

</div>

Ok. We will switch to a different formatter very soon, which should fix this issue (and a bunch more). I’d recommend not using the integrated formatter for now.
