crystal-lang-tools / vscode-crystal-lang

Yet another VSCode extension for Crystal Programming Language
https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
MIT License
277 stars 58 forks source link

How to autoformat on save? #162

Closed alanwilter closed 1 year ago

alanwilter commented 1 year ago

Is this property there?

When I save I was expecting the code to be formatted, like removing trimming whitespace, add the space where needed, etc.

Or maybe I'm too used to python + black and crystal has nothing close to it?

nobodywasishere commented 1 year ago

There's a setting in VSCode to turn this on (either at the User level or you can set it per workspace). I just tested and it worked perfectly. See this StackOverflow post.