Back to Extensions Directory
Read the complete README
@statiolake/coc-format-on-save
statiolakeFormat on save in coc
Installation CommandVim prompt
:CocInstall @statiolake/coc-format-on-save
GitHub owner
statiolakeVersion
v0.6.1npm package
@statiolake/coc-format-on-saveRequirements
coc ^0.0.80
License
MIT
Repository
GitHubnpm latest published 2026-07-16Registry checked 2026-08-23Registry summary
Published Package Summary
coc-format-on-save
Format on save in coc
- Format on save in coc
Activation Events
- *
Developer Resources
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for @statiolake/coc-format-on-save@0.6.1.
| Command (:CocCommand) | Description |
|---|---|
| format-on-save.formatOnDemand | Format current document if formatting is enabled |
| format-on-save.format | Format current document |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
format-on-save.actionsobject
Raw JSON Schema
{
"type": "object",
"items": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arguments to pass to the command"
},
"command": {
"type": "string",
"description": "coc command or Vim command to run"
},
"commandType": {
"enum": [
"coc",
"vim"
],
"type": "enum",
"default": "coc",
"description": "Command type"
}
}
},
"scope": "language-overridable"
}format-on-save.enabledboolean
Enable format-on-save extension
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable format-on-save extension"
}format-on-save.actionTimeoutnumber
Timeout for actions
Default: 5000
Raw JSON Schema
{
"type": "number",
"scope": "application",
"default": 5000,
"description": "Timeout for actions"
}format-on-save.waitAfterActionnumber
Wait after executing action to ensure change occurs
Default: 500
Raw JSON Schema
{
"type": "number",
"scope": "application",
"default": 500,
"description": "Wait after executing action to ensure change occurs"
}format-on-save.formatterTimeoutnumber
Timeout for LSP formatter
Default: 5000
Raw JSON Schema
{
"type": "number",
"scope": "application",
"default": 5000,
"description": "Timeout for LSP formatter"
}format-on-save.sortCocSettingsJsonboolean
Sort coc-settings.json
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "language-overridable",
"default": true,
"description": "Sort coc-settings.json"
}format-on-save.trimTrailingWhitespaceboolean
Remove trailing spaces and tabs before formatting
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "language-overridable",
"default": true,
"description": "Remove trailing spaces and tabs before formatting"
}format-on-save.organizeImportWithFormatboolean
Organize import on save too
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "language-overridable",
"default": true,
"description": "Organize import on save too"
}