Rustfmt Plugin

Wrapper plugin that formats Rust code via rustfmt.

Install and Setup

In dprint.config.json:

  1. Specify the plugin url in the "plugins" array.
  2. Ensure .rs file extensions are matched in an "includes" pattern.
  3. Add a "rustfmt" configuration property if desired.
{
    // ...etc...
    "rustfmt": {
        // rustfmt config goes here
        "brace_style": "AlwaysNextLine"
    },
    "plugins": [
        // ...etc...
        "https://plugins.dprint.dev/rustfmt-x.x.x.wasm"
    ]
}

Configuration

See documentation here.