Is it possible to make Visual Studio Code run cargo fmt
on file save?
Install the extension rust-analyzer (the officially recommended vscode extension), and add the following to settings.json:
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
}