21

IntelliJ Rust Changelog #127

 3 years ago
source link: https://intellij-rust.github.io/2020/07/27/changelog-127.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

New Features

  • Support Rust documentation rendering in an editor. Just click to the corresponding icon on gutter to look at rendered version of a particular comment. Also, you can enable it by default via Render documentation comments option in Preferences / Settings | Editor | General | Appearance settings. Note, there are some restrictions in 2020.1 IDEs. See here for more details

    BVjqEj6.png!web

  • Provide initial formatter for TOML. Currently, it affects only spacing and indentation. You can adjust settings via Preferences / Settings | Editor | Code Style | TOML panel (by @Kobzol )

    i6RvYbV.png!web

  • Add quick fix for Mismatched types error annotation to change type of local variable (by @Kobzol )

    6NFbUry.png!web

  • Make Go to Type Declaration Ctrl+Shift+B action work properly with macro-generated items

    mUVV32.png!web

  • Keep existing reference style while Move F6 refactoring, i.e. absolute paths stay absolute, one segment paths stay one segment, etc.

Performance Improvements

  • Slightly speed up indexing. Now, the plugin correctly handle new experimental raw syntax and doesn’t parse blocks with it while indexing that decreases duration of the corresponding phase

Fixes

  • Test tool window improvements:
    • Show whole Cargo output in Test tool window
    • Navigate to proper line from doc test item in test tree
    • Use Left / Right labels instead of Expected / Actual (by @Kobzol )
  • Name resolution fixes:
    • Properly handle crate::macro_name! calls while name resolution. Previously, such calls couldn’t be resolved and as a result, the plugin couldn’t expand the corresponding macro call
    • Do not resolve project dependencies in build scripts and build dependencies inside common project code
  • Handle module re-exports with aliases while path collection for auto import. Previously, the plugin didn’t take into account module aliases that led to the absence of Import quick fix in some cases
  • Do not offer let and return keywords inside struct literals and struct patterns while completion (by @Kobzol )
  • Improve Add unsafe to block quick fix to find the closest enclosing block (by @Kobzol )
  • Improve documentation links for dependencies in Cargo.toml
  • Fix IndexOutOfBoundsException because of invalid rustc annotation
  • Fix Synchronous execution on EDT exception while new Rust project creation
  • Fix possible PsiInvalidAccessException and wrong name resolution in some cases

Internal Improvements

  • Introduce Crate and Crate Graph abstractions. Previously, the plugin operated with raw Cargo targets. Now, most of the target usages replaced with Cargo-independent Crate API. It should isolate knowledge about build system from common language code like name resolution, completion, etc. Which in turn makes the existent code clearer and should simplify support for new build tools in the future

Full set of changes can be found here


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK