Snakefmt extension for Visual Studio CodeA Visual Studio Code extension that formats Snakemake code using Snakefmt. The extension ships with FeaturesThis extensions uses Files or code chunks can be formatted on-demand by right clicking in the document and selecting "Format Document", or by using the associated keyboard shortcut (usually Ctrl+⇧+F on Windows, Ctrl+⇧+I on Linux, and ⇧+⌥+F on macOS). To automatically format a file on save, add the following to your vscode settings.json file:
Settings
|
| Command | Description |
|---|---|
| Snakefmt: Restart server | Force re-start the format server. |
Logging
From the Command Palette (View > Command Palette ...), run the Developer: Set Log Level... command. Select Snakefmt from the Extension logs group. Then select the log level you want to set.
Alternatively, you can set the snakefmt.trace.server setting to verbose to get more detailed logs from the Snakefmt server. This can be helpful when filing bug reports.
To open the logs, click on the language status icon ({}) on the bottom right of the Status bar, next to the Python language mode. Locate the Snakefmt entry and select Open logs.
Source code
Available on github: https://github.com/tfehlmann/vscode-snakefmt-provider
Release Notes
0.11.3
- Update bundled
snakefmtto2.0.3 - Update CI and release tooling to
uv0.11.24
0.11.2
- Update bundled
snakefmtto2.0.2 - Fix Renovate PR creation so dependency updates are no longer blocked behind pending PR-only checks
- Override vulnerable npm transitive dependencies and update
ujsonto resolve Dependabot alerts
0.11.1
- Update npm and Python test dependencies to resolve Dependabot security alerts
0.11.0
- Update bundled
snakefmtto2.0.0 - Breaking: snakefmt now formats shell blocks in rules by default. Users can opt out with
--no-format-shellviasnakefmt.argsorformat_shell = falseinpyproject.toml - Add bundled
shfmt-pysupport required by snakefmt shell formatting - Update bundled
blackto26.5.1
0.10.0
- Update bundled
snakefmtto1.0.0 - Breaking: snakefmt now automatically reorders rule directives by default. Users can opt out with
--no-sortviasnakefmt.args - Update bundled
blackto26.3.1
0.9.0
- Update bundled
snakefmtto0.11.4 - Require Python 3.11+ (previously 3.8)
- Add automated publishing to VS Code Marketplace and Open VSX
- Update CI to Node 20, Python 3.11+, latest GitHub Action versions
- Migrate to ESLint 10 flat config
- Update all npm and Python dependencies
0.8.0
- Update bundled
snakefmtto0.10.2
0.7.0 (preview release)
- Update bundled
snakefmtto0.8.5 - Fix "There is no formatter for Snakemake files installed" error
- Remove logging setting, switch to VSCode integrated log level
0.6.0
- Update bundled
snakefmtto0.8.1
0.5.0 (preview release)
- Add support for Python 3.11
- Update bundled
snakefmtto0.7.0
0.4.0
- Integrate 0.3.0 preview release features
- Improve linting messages
0.3.0 (preview release)
- Support Python formatting
- Add better linting messages and error highlighting
0.2.0
- Add linting support
- Support for multi-root workspace
- Add bundled
snakefmt
0.1.0
Initial release