I have added an extra option rust-analyzer.rustfmt.extraArgs
to my settings.json
file:
{
"[rust]": {
"editor.inlayHints.enabled": "offUnlessPressed",
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
},
"rust-analyzer.rustfmt.extraArgs": ["+nightly"]
}
Now it works as I expect it - file saving applies formatting according with style_edition
, imports_granularity
, group_imports
and other nightly options from a rustfmt.toml
.