Changelog #14

Commit: 2c8f136
Release: 2020-03-02

New Features

  • #3159, #3321, #3322 switch syntax highlighting implementation to use the new proposed semantic token LSP/VS Code API.To try this out:

    • install vscode plugin from source (using cargo xtask install --client-code)

    • set "rust-analyzer.highlighting.semanticTokens": true, in settings,

    • install the recent VS Code Insiders

    • run code as code-insiders --enable-proposed-api matklad.rust-analyzer (handy bash wrapper)

  • #3362 remove ctrl+r default keybinding for running tests & binaries, to avoid conflict with a build-in keybinding. You might want to assign shortcut for this action, it is a productivity booster!

    75686456 93a5ed80 5c9c 11ea 83b3 05adecfd07c2
  • #3349 rust-analyzer now highlights code in rust-analyzer’s own tests as rust:

    75685194 77a14c80 5c9a 11ea 86b0 5ac223451b10
  • #3294 when joining lines, unwrap single-statement blocks if possible.

  • #3285 structural search replace now correctly ignores whitespace differences.

  • #3357 change visibility assist now works with consts:

    75685982 c56a8480 5c9b 11ea 84ca a9cf07bfe0ce
  • #3355 add completion & docs for featureFlag configuration in VS Code extension.

  • #3309 look for Cargo.toml not only in the root and parent directory, but also among one-level child directories.

  • #3387 type inference for slice patterns.

  • #3397 add minimal metatdata to VS Code extension.


  • #3314, #3325, #3350, #3366 fix a lot of range-mapping bugs for recursive macro invocations.

  • #3308 fix conflict for Enter key with VS Code vim extension. If rust-analyzer’s custom on enter behavior causes you trouble, you can disable it by removing the corresponding shortcut from the settings.

  • #3364 correctly handle unions in IDEs.

  • #3367 finally fix highlighting and name goto definition for constants in patterns, like None.

  • #3376 fix a common false-positive type mismatch.

  • #3380 use unsizing in method resolution & autoderef for indexing.

  • #3384 fix name resolution for paths with repeated super segments.

Internal Improvements

  • #3222 redo the interface between "compiler" and "IDE". IDE no longer needs to explicitly track the file a particular bit of syntax tree originated from.

  • #3296 bump TypeScript version.

  • #3299 more type safe way to deal with custom LSP extensions.

  • #3298 update chalk.

  • #3316 remove code duplication in assists tests.

  • #3324, #3335, #3344, #3346 refactor syntax highlighting infrastructure to be more future proof and robust.

  • #3329, #3330 run cargo audit and npm audit on CI.

  • #3337 remove unused dependencies.

  • #3340 gate CI on eslint.

  • #3351 better API for working with string literals.

  • #3360 fix parsing of attributes in let statements.

  • #3370 extract code for adding a new use item to a separate module.

  • #3374 cleanup API for constructing syntax trees for paths.

  • #3375 cleanup API for editing syntax trees.

  • #3377 simplify API for getting semantic definitions from syntax trees.