Bold text denotes the names of actions you can type in the Find Action dialog (Ctrl+Shift+A or quickly press Shift twice for Find Anything). Shortcuts are given for the default Windows/Linux keymap. To learn shortcuts for your keymap consult Help > Keymap reference. Shortcut for an action is also displayed in the Find Action dialog.

Smart editor

Syntax highlighting

IntelliJ Rust, apart from basic lexer highlighting, also highlights resolved types, functions, variables (marking out mutable ones) and macros. All color schemes are customizable and we support both Default and Darcula themes out of the box.

Code formatter

Reformat Code Ctrl+Alt+L reformats current file or selection using our custom, fully functional formatter based on IntelliJ's formatting engine. There's also a special action for formatting code with rustfmt.

Code selection

To select a block of code place a cursor inside block and press Ctrl+W to expand it to an expression, to a line, to a logical block of code, and so on. To shrink selection press Ctrl+Shift+W as many times as needed.

Code commenting

After selecting a block, you can apply a block comment (Ctrl+Shift+/) or line comment (Ctrl+/) to it. The same shortcuts will remove existing comments from selected lines too.

Code folding

Code folding, auto-insertion of braces, brackets & quotes, matching brace/bracket highlighting, etc.

On-the-fly analysisWIP

Errors are shown as you type. Among others, we catch syntax errors, missing fields/methods and unnecessary parens. We also support IntelliJ's built-in spell-checker.

Code CompletionWIP

IntelliJ Rust features built from scratch code completion, leveraging IntelliJ Platform capabilities. Ctrl+Space invokes completion. We do not plan to use racer. Most of the code completion is implemented, but support for macros is a work in progress.

Remember, if the smart completion does not work for your particular case, you can always invoke "dumb completion" via Alt+/. It merely suggests identifiers already present in the file, but works surprisingly well.

Source code navigation

There are a number of actions for efficient navigation across your project and dependencies.

Find UsagesWIP

Alt+F7 finds usages of element at caret.

Goto Declaration

Ctrl+B goes to the definition of the symbol at caret.

Goto Class

Ctrl+N search for a struct or enum by name.

Goto Symbol

Ctrl+Shift+Alt+N searches for any symbol (types, methods, functions, fields) by name. Together with Ctrl+N it is the main method to explore large projects.

Goto Super

Ctrl+U navigates to the parent module.

File Structure

Ctrl+F12, Alt+7 brings up an overview of the current file.


Gutter icon or Ctrl+Alt+B shortcut can be used to navigate between traits or types and impls.

Code generation and refactorings

'Surround With' and Live Templates

There is a number of built in live templates and you can define your own. Different live templates are available in different contexts. Use Ctrl+J to list templates available in context.

  • p, pd, ppd - println! value with {}, debug {:?} and pretty debug {:#?} formats.

  • a, ae - assert! / assert_eq!

  • tfn - test function boilerplate

    tmod - test module boilerplate

  • f, pf - (pub) field name and type, applicable inside struct definitions.

  • loop, while, for templates. You can select a fragment of code and press Ctrl+Alt+J to invoke Surround With Live Template action.


Expand module: invoke this refactoring inside file to get foo/ Also available as a quick fix for unresolved module declaration.

Introduce variable: use Ctrl+Alt+V or .let postfix template to extract a variable from an expression.


Intentions and quick fixes are micro refactorings automatically available depending on the context. If some intentions are available, a light bulb icon appears in the editor. You can use Alt+Enter to invoke a quick fix.

Contract module: the opposite of Expand Module refactoring. Available only if there are no child modules.

Create module file: if you have mod foo;, but no this quick fix will create the missing file.

Extract inline module: move mod foo { ... } to a separate file.

Add derive clause: adds #[derive(..)] attribute to structs and enums.

Remove/Add curly braces: toggles between use foo::{bar} and use foo::bar.

Add missing fields: a handy way to fill out the struct literal template.

Implement methods: quickly scafold an impl.



IntelliJ Rust highlights important parts of documentation comments, so they never look so bland.

Quick documentation

Ctrl+Q shows docs for the symbol at caret.

Reading code

Quick documentation

Ctrl+Q shows docs for the symbol at caret.

Documentation highlighting

IntelliJ Rust highlights important parts of documentation comments, so they never look so bland.

Parameter hints

In the editor, you can see hints with names of parameters and types of local variables

Type information

Use Ctrl+Shift+P to view the type of selected expression.



Built-in Cargo Command run configuration allows to build, test and run Rust code.

Context aware

You can use Ctrl+Shift+F10 shortcut to run a main or a test function. Alternatively, you can use the icon in the gutter area.


You can combine Ctrl+Alt+Shift+N with Ctrl+Shift+F10 to find and execute a test without switching between code and tests.