How to Format in a Code Editor like VS Code?

There has to be something people use to auto-format code when using an editor. I tried some vs code extensions, but the only one that works doesn’t format the {% schema %} code at the end. It messes it up. So I am at a loss and have nothing to format code.