https://github.com/statiolake/vscode-rustfmt
Register Rustfmt as a formatter for rust
https://github.com/statiolake/vscode-rustfmt
Last synced: 3 months ago
JSON representation
Register Rustfmt as a formatter for rust
- Host: GitHub
- URL: https://github.com/statiolake/vscode-rustfmt
- Owner: statiolake
- License: other
- Created: 2019-02-06T04:52:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-29T15:27:46.000Z (about 1 year ago)
- Last Synced: 2025-05-29T16:55:35.269Z (about 1 year ago)
- Language: TypeScript
- Size: 142 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode-rustfmt
Register `rustfmt` as a formatter for Rust code.
Note: You basically doesn't need this extension since now you can use official [Rust Analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) extension to run formatter (even for single Rust file).
## Features
- Format when editing `.rs` file.
## Configurations
Include the following setting to your `settings.json`:
```
"[rust]": {
"editor.defaultFormatter": "statiolake.vscode-rustfmt",
"editor.formatOnSave": true //optional
}
```
Alternatively, you can use official formatter:
```
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust",
"editor.formatOnSave": true //optional
}
```
## Requirements
You must have `rustfmt` in your PATH.
## Release Notes
### Version 0.1.3
Make `edition` flag configurable (defaults to 2021).
### Version 0.1.2
Add `--edition 2018` flag.
### Version 0.1.1
Fix and issue related to not picking the local rustfmt.toml. (#2)
### Version 0.1.0
(This version is lost)
### Version 0.0.1
Initial release.