Update IntelliJ Integration (#4238)
This commit is contained in:
parent
a5f85058ac
commit
9027db984b
23
intellij.md
23
intellij.md
@ -3,19 +3,28 @@
|
||||
## Installation
|
||||
|
||||
- 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/).
|
||||
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))
|
||||
|
||||
- Install the [Rust Plugin](https://intellij-rust.github.io/) by navigating to File -> Settings -> Plugins and press "Install JetBrains Plugin"
|
||||

|
||||
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.
|
||||
|
||||
- Press "Install" on the rust plugin
|
||||

|
||||
- Install the [Rust Plugin](https://intellij-rust.github.io/) by navigating to File → Settings → Plugins and searching the plugin in the Marketplace
|
||||

|
||||
|
||||
- Press "Install" on the Rust plugin
|
||||

|
||||
|
||||
- Restart CLion/IntelliJ
|
||||
|
||||
## Configuration
|
||||
|
||||
- Open the settings window (File -> Settings) and search for "reformat"
|
||||
### Run Rustfmt on save
|
||||
|
||||
- Open Rustfmt settings (File → Settings → Languages & Frameworks → Rust → Rustfmt) and enable "Run rustfmt on Save"
|
||||

|
||||
|
||||
- IntellJ uses autosave, so now your files will always be formatted according to rustfmt. Alternatively you can use Ctrl+S to reformat file manually
|
||||
|
||||
### Bind shortcut to "Reformat File with Rustfmt" action
|
||||
|
||||
- Open the settings window (File → Settings) and search for "reformat"
|
||||

|
||||
- Right-click on "Reformat File with Rustfmt" and assign a keyboard shortcut
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user