IntelliJ Rust

Open-source Rust plugin for IntelliJ-based IDEs

Install

Stable builds

IntelliJ Rust is in active development, and we regularly publish new stable builds to the JetBrains plugin repository. You can download and install them directly from Settings / Preferences | Plugins | Marketplace in your IDE.

Nightly builds

In addition to stable releases, we also ship nightly snapshots of the intellij-rust development branch. To use the nightly channel, add a custom plugin repository and set the following URL:

https://plugins.jetbrains.com/plugins/nightly/8182

Compatible IDEs

The plugin is compatible with all Intellij-based IDEs like IDEA, CLion, or PyCharm. The latest plugin version supports the latest released platform version (for example, 2019.2).

Bug reports and feature requests

Please use our tracker. You can get there quickly right from the IDE: call Create New Issue on a selected piece of code, and you’ll jump to a pre-filled issue creating form.

Also feel free to ping us on Gitter.

×

Source

Intelligent Rust

editor features

IntelliJ Rust brings JetBrains-quality language support and full IDE experience to your Rust workflow.

Rust becomes native to IDEA, CLion, and other IntelliJ IDEs with smart coding assistance, seamless Cargo support, and built-in test runner.

In CLion, you get even more: fully-fledged debugger, CPU profiler, and Valgrind memcheck.

What's new

IntelliJ Rust Changelog #184

Update on Procedural Macros Support

We finally enabled function-like and derive procedural macro expansion by default 🎉

Now the plugin provides them with syntax highlighting, completion, the Show Macro Expansion popup, and other features already available for declarative macros. Generated items are now suggested in code completion and considered in other code insight features:

Note that attribute procedural macro expansion is still disabled by default. If you want to try out, enable org.rust.macros.proc.attr experimental feature.

Read more about macros and how they are supported in Rust plugin in the corresponding blog post

New Features

  • #4768 Show coerced types via View | Type Info action (Ctrl+Shift+P)

  • #9686 Support short intra-doc links (in the [link] format)

  • #9808 Parse half-open range patterns

  • #9760 Notify users about changes in the crate roots of procedural macro libraries to reload the project model. Otherwise, the plugin won’t be able to expand procedural macro calls properly

  • #9711 Experimentally set RUST_IDE_PROC_MACRO_COMPLETION and RUST_IDE_PROC_MACRO_COMPLETION_DUMMY_IDENTIFIER environment variables for procedural macro when invoking them during completion. The idea is that authors of procedural macros could use these variables and based on them change the behavior of the macro to provide a better (possibly custom) completion for IDE users. See usage example in yew::html! macro

Fixes

  • #9756 Suggest Reload project instead of Attach file to a module quick-fix for the crate root files after their creation

  • #9761 Fix type inference in closures on nightly Rust

  • #9779 Fix false-positive errors like Use of moved values after invalidating caches without clearing file caches

  • #9800 Fix impl search when there are multiple type aliases with the same names

  • #9783 Fix move statement up/down editor action being incorrectly disabled with some IDE configurations (by @afetisov)

  • #9823 Fix completion inside local macro calls in 2022.3 IDE builds

  • #9767 Fix navigation, highlighting, completion and other code insight features with function-like macros invoked in the pattern context

  • #9762 Fix Find usages for variables defined by macros

  • #9764 Fix handling of nested blocks expanded from local macros

  • #9741 Don’t offer Un-elide lifetimes intention when there are no input lifetimes

  • #9788 Don’t show File does not belong to any known Cargo project warning for scratch files

  • #9345 Fix nesting of renamed imports (by @afetisov)

  • #9745 Restore Import | Fix all 'Unresolved reference' problems in file quick-fix option, which adds all missing unambiguous imports. Note, if you prefer missing imports to be fixed on the fly, you can enable Add unambiguous imports on the fly option in Settings | Editor | General | Auto Import settings

  • #9737 Don’t create separate Undo entries when adding unambiguous import on the fly

Internal Improvements

  • #9758 Make 2022.3 platform default for development

Full set of changes can be found here