Help me Stack Overflow, you are my only hope.
I’d like to apply auto-formatting in VS Code to PHP files with the following rules:
- Stroustrup style braces (K&R variant)
- space before conditional
- space after function
- spaces in parentheses
I don't want to apply PSR-1 or PSR-2 or PSR-12 or CakePHP or WordPress standards.
I've struggled with:
- VS code internal PHP formatter
- phpfmt (which has been last updated in 2018 and archived on GitHub)
- PHP Intelephense (which has little to do with formatting, as far as I can tell)
phpfmt is the closest, but super-buggy.
VS Code settings wise, I roll with:
- "files.autoSave": "onFocusChange",
- "editor.formatOnSave": true,
So I'd like to instantly beautify my PHP files, please.
Thank you for any ideas!
