Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ This extension has the following settings:
* `/usr/local/bin/phpcbf`
* etc
* `phpcbf.documentFormattingProvider`: [ Optional | Default: `true` ] Register PHP document formatting provider, right mouse-click context menu, select 'Format Document'
* `phpcbf.onsave`: [ Optional | Default: `false` ]. Format on save. `"editor.formatOnSave": true` will override this setting.
* `phpcbf.onsave`: [ Optional | Default: `false` ]. Format PHP files on save using a VS Code `onWillSaveTextDocument` listener. **Note**: this listener only fires when `"editor.formatOnSave"` is **not** set to `true`. If `"editor.formatOnSave": true` is enabled in the same scope, VS Code's built-in save formatter runs instead (via `documentFormattingProvider`).
> **Recommended**: For reliable format-on-save, use `"editor.formatOnSave": true` together with `"[php]": { "editor.defaultFormatter": "persoderlind.vscode-phpcbf" }` rather than `phpcbf.onsave`.
* `phpcbf.debug`: [ Optional | Default: `false` ]. Write phpcbf stdout to the console.
* `phpcbf.standard`: [ Optional | Default: `null` ]. The [coding standard](#coding-standards).

Expand Down