# VSCode formatter not working

**URL:** <https://forum.crystal-lang.org/t/vscode-formatter-not-working/3160>\
**Category:** Community\
**Created:** [April 5, 2021, 5:39pm UTC](https://forum.crystal-lang.org/t/vscode-formatter-not-working/3160 "2021-04-05T17:39:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hipertracker](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/hipertracker/32/1230_2.png) [@hipertracker](https://forum.crystal-lang.org/u/hipertracker)\
**Post date:** [April 5, 2021, 5:39pm UTC](https://forum.crystal-lang.org/t/vscode-formatter-not-working/3160/1 "2021-04-05T17:39:21Z")

</div>

I cannot format \*.cr files in VSCode after Cmd+Shift+P + Format Document. I have installed [Crystal Language](https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang) 0.8.1 extension. I am using macOS Big Sur 11.2.3 and VSCode v1.55.0.

---

<div class="post-metadata">

**Author:** ![ejstembler](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/ejstembler/32/553_2.png) [@ejstembler](https://forum.crystal-lang.org/u/ejstembler)\
**Post date:** [April 7, 2021, 4:10am UTC](https://forum.crystal-lang.org/t/vscode-formatter-not-working/3160/2 "2021-04-07T04:10:16Z")

</div>

I’m using Visual Studio Code on Mac too and you could always just do this: `Terminal > New Terminal` then `crystal tool format`. That’s what I do since I always have terminal open anyway for [sentry](https://github.com/samueleaton/sentry).

---

<div class="post-metadata">

**Author:** ![RespiteSage](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/respitesage/32/793_2.png) [@RespiteSage](https://forum.crystal-lang.org/u/RespiteSage)\
**Post date:** [April 7, 2021, 2:11pm UTC](https://forum.crystal-lang.org/t/vscode-formatter-not-working/3160/3 "2021-04-07T14:11:04Z")

</div>

Formatting works for me with this in my `settings.json`:

```json
"[crystal]": {
  "editor.formatOnSave": true,
  "editor.defaultFormatter":"crystal-lang-tools.crystal-lang"
}

```

I assume you may not want the format on save, but I wouldn’t expect that to work unless manual formatting also worked.
