Steps
- Open your user or workspace
settings.json. - Add:
"editor.defaultFormatter": "mokoconsulting.mokoformat", "editor.formatOnSave": true - That's it — MokoFormat registers for JS/TS, HTML, CSS/SCSS/LESS, JSON/JSONC, Markdown, YAML and PHP, routing each to the right engine (Prettier for web, php-cs-fixer/phpcbf for PHP).
Why this is needed
VS Code only has one global editor.defaultFormatter, so you normally have to set a different formatter per language. MokoFormat is a single formatter that dispatches internally, so one setting covers the whole stack. Prettier still honours a project .prettierrc.
Part of the Moko VS Code suite.