• Applicable Software: General
  • Min Version Number: 00.01.00
  • Max Version Number: Not Applicable

Set it up

Set MokoFormat as your default formatter once:

"editor.defaultFormatter": "mokoconsulting.mokoformat",
"editor.formatOnSave": true

It registers for JavaScript/JSX, TypeScript/TSX, HTML, CSS/SCSS/LESS, JSON/JSONC, Markdown, YAML and PHP — so you don't need per-language formatter settings.

Features

  • Format Document and Format Selection (range) for every supported language. Prettier honours a project .prettierrc.
  • PHP via php-cs-fixer with a phpcbf fallback; auto-detects a project .php-cs-fixer.php or phpcs.xml. It fails loud (tells you what it tried) rather than leaving code unformatted.
  • Diagnose PHP — reports the engines found, their paths, the detected config and your PHP version.

The web-stack engines are bundled, so no separate install is needed; PHP needs a PHP engine on the machine. Part of the Moko VS Code suite.