|
3 | 3 | ## Installation
|
4 | 4 |
|
5 | 5 | - Install [CLion](https://www.jetbrains.com/clion/), [IntelliJ Ultimate or CE](https://www.jetbrains.com/idea/) through the direct download link or using the [JetBrains Toolbox](https://www.jetbrains.com/toolbox/).
|
6 |
| - CLion provides a built-in debugger interface but its not free like IntelliJ CE - which does not provide the debugger interface. (IntelliJ seems to lack the toolchain for that, see this discussion [intellij-rust/issues/535](https://github.com/intellij-rust/intellij-rust/issues/535)) |
7 |
| - |
8 |
| -- Install the [Rust Plugin](https://intellij-rust.github.io/) by navigating to File -> Settings -> Plugins and press "Install JetBrains Plugin" |
9 |
| -  |
| 6 | + CLion and IntelliJ Ultimate [provide a built-in debugger interface](https://github.com/intellij-rust/intellij-rust#compatible-ides) but they are not free like IntelliJ CE. |
| 7 | + |
| 8 | +- Install the [Rust Plugin](https://intellij-rust.github.io/) by navigating to File → Settings → Plugins and searching the plugin in the Marketplace |
| 9 | +  |
10 | 10 |
|
11 |
| -- Press "Install" on the rust plugin |
12 |
| -  |
| 11 | +- Press "Install" on the Rust plugin |
| 12 | +  |
13 | 13 |
|
14 | 14 | - Restart CLion/IntelliJ
|
15 | 15 |
|
16 | 16 | ## Configuration
|
17 | 17 |
|
18 |
| -- Open the settings window (File -> Settings) and search for "reformat" |
| 18 | +### Run Rustfmt on save |
| 19 | + |
| 20 | +- Open Rustfmt settings (File → Settings → Languages & Frameworks → Rust → Rustfmt) and enable "Run rustfmt on Save" |
| 21 | +  |
| 22 | + |
| 23 | +- IntellJ uses autosave, so now your files will always be formatted according to rustfmt. Alternatively you can use Ctrl+S to reformat file manually |
| 24 | + |
| 25 | +### Bind shortcut to "Reformat File with Rustfmt" action |
| 26 | + |
| 27 | +- Open the settings window (File → Settings) and search for "reformat" |
19 | 28 | 
|
20 | 29 | - Right-click on "Reformat File with Rustfmt" and assign a keyboard shortcut
|
21 | 30 |
|
|
0 commit comments