It’s been a while since the previous IntelliJ Rust update, so it’s a high time to give a summary of what has happened since then!
First of all, the plugin is officially supported by JetBrains: https://blog.jetbrains.com/blog/2017/08/04/official-support-for-open-source-rust-plugin-for-intellij-idea-clion-and-other-jetbrains-ides/. Now two people from JetBrains, vlad20012 and me, are working together to make it great!
The greatest recent improvement is a much better support for Rust type system, implemented by Vladislav. Now we handle generic types properly, so code completion and navigation are available inside lambdas, iterators, futures and such.
Our Cargo integration story has improved: now it is possible to link more then one Cargo project to an IDE project, even if you don’t use workspaces. There’s also a dedicated Cargo toolbar, which shows projects status. Also, Run Configurations and Run Cargo command actions now provide code completion for the Cargo command line based on the currently opened project.
There’s also a preliminary debugger support in CLion.
Some other miscellaneous improvements and features include
- Parameter names and local variable type hints.
- Better navigation with ability to search for implementations by type or trait.
- Ctrl+F9 to build project in IDEA.
- Ability fill an impl types and functions based on trait (video).
- Support for moving syntactic elements up/down (Ctrl+Shift+Up/Down) and left/right (Ctrl+Shift+Alt+Right/Left) (video).
- Quick definition (Ctrl+Shift+I).
- Highlighting of function’s exit points, and semantic highlighting.
- Typing assistance: join lines (Ctrl+Shift+J) cleanups commas and blocks, semicolon is inserted after return automatically in unit-returning functions, completion for function calls inserts parenthesis.
- Completion and navigation for macro definitions.
- Introduce variable (Cltr+Alt+V or
- Various new inspections and intentions.
Thanks a lot to our awesome 58 contributors!
Some useful links: