Ferrum Marketplace

Format on Save

Vyloxi ✔ · ⬇ 1 installs · Formatters

Runs a formatter (Prettier, rustfmt, gofmt, black, shfmt...) on a file each time you save it. Off until you turn it on.

vyloxi.format-on-save Download .fext

In Ferrum open Extensions in the sidebar, search for Format on Save and press Install. Or use Extensions: Install from File with the downloaded file.

What it adds

Commands (3)

CommandId
Format on Save: Turn Format on Save On or OffformatOnSave.toggle
Format on Save: Format This File NowformatOnSave.now
Format on Save: Show the Formatter for Each File TypeformatOnSave.showCommands

Settings

SettingDefaultWhat it does
formatOnSave.enabledfalseRun the formatter every time you save.
formatOnSave.commands''A JSON object from file extension to command, with {file} where the path goes. Example: {"js": "npx prettier --write {file}", "py": "ruff format {file}"}. Empty uses the built in list.

Code

Runs JavaScript from extension.js when: onStartup.