RustCodeFormatter
A sublime plugin to format rust code (wrapper for rust-style).
Details
Installs
- Total 4K
- Win 2K
- OS X 1K
- Linux 1K
Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
OS X | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
RustCodeFormatter
RustCodeFromatter is a plugin for Sublime Text 3 which allows the formatting of rust code. This plugin is a binding for rust-style. The default key to format selected lines is ctrl+k, ctrl+f
. See issues section below for limitations.
Requirements
- Install the Rust syntax highlighting sublime package.
- Clone and compile rust-style. Place the executable in your search path; or direct the plugin to use the absolute path of the executable (see below Setup -> 2).
Setup
- Install the RustCodeFormatter package through package control or clone this project to
{sublime data}/Data/Packages/RustCodeFormatter
. - (Optional) To set the absolute path to your rust-style installation:
- Open the command pallete by pressing
Ctrl+Shift+P
or through the menuTools -> Command Pallete
. - Enter/select
Rust Code Formatter: Set Path
. - An input field will appear with the default content
rust-style
. Replace with an absolute path, ieC:\directory\rust-style.exe
and press enter.
- Open the command pallete by pressing
- (Optional) To setup custom style preferences:
- Open the command pallete by pressing
Ctrl+Shift+P
or through the menuTools -> Command Pallete
. - Enter/select
Rust Code Formatter: Add New Style
. - Select one of the opened directories listed or select
Other...
and insert custom directory.
- Open the command pallete by pressing
- (Optional) To change the key binding, open menu
Preferences -> Key Bindings - User
and add the following, substituting with your own key preference:
[
{
"keys": ["ctrl+k", "ctrl+f"], "command": "rust_code_formatter_format",
"context":
[
{"key": "selector", "operator": "equal", "operand": "source.rust"}
]
}
]
Note: If there already exists other user key bindings, insert the key binding without replacing everything.
Issues
- rust-style is a work in progress and still has formatting issues and bugs.