A binding for Sublime Text to the Rustfmt.
- Clone and build the rustfmt
- Install the package through package control (or clone from git if you prefer): https://sublime.wbond.net/packages/BeautifyRust
- If an error is encountered while processing the file or can not find
rustfmt
in path, following messageBeautify rust: can not find rustfmt in path.
is displayed. Open menu in yourPreferences -> Package settings -> BeautifyRust -> Settings - User
, and edit the settings file using below as a template:
{
"run_on_save": false,
"show_errors": true,
"rustfmt": "/Users/user/.cargo/bin/rustfmt"
// Optionally, you may specify an array of arguments to pass to rustfmt
// For example, if you have a system wide rustfmt configuration file
// "args": [
// "--config-path=/Users/user/.rust/"
// ]
}