A simple plugin to format Rust code.
This package relies on the amazing rustfmt to format Rust source code files.
Install with Cargo using cargo install rustfmt
or via instructions on the website.
- Install Package Control
- Run
Package Control: Install Package
in the Command Palette (Super+Shift+P) - Install
RustFormat
-
Navigate to the Sublime Text package directory
-
Clone the repository
$ git clone https://github.com/Rypac/sublime-rust-format.git RustFormat
RustFormat: Format Selection
- Format the current selection
RustFormat: Format File
(Ctrl+k, Ctrl+f)- Format the current file
RustFormat: Enable Format on Save
- Enable automatic formatting of Rust source files on save
RustFormat: Disable Format on Save
- Disable automatic formatting of Rust source files on save
rust_format_on_save
- Automatically format files on save
rust_format_binary
- Full path to
rustfmt
binary (if not onPATH
)
- Full path to