rust-analyzer/editors/code
bors[bot] 49646b71d4
Merge #11445
11445: Upstream inlay hints r=lnicola a=lnicola

Closes https://github.com/rust-analyzer/rust-analyzer/issues/2797
Closes https://github.com/rust-analyzer/rust-analyzer/issues/3394 (since now resolve the hints for the range given only, not for the whole document. We don't actually resolve anything due to [hard requirement](https://github.com/rust-analyzer/rust-analyzer/pull/11445#issuecomment-1035227434) on label being immutable. Any further heavy actions could go to the `resolve` method that's now available via the official Code API for hints)

Based on `@SomeoneToIgnore's` branch, with a couple of updates:

 - I squashed, more or less successfully, the commits on that branch
 - downloading the `.d.ts` no longer works, but you can get it manually from https://raw.githubusercontent.com/microsoft/vscode/release/1.64/src/vscode-dts/vscode.proposed.inlayHints.d.ts
 - you might need to pass `--enable-proposed-api matklad.rust-analyzer`
 - if I'm reading the definition right, `InlayHintKind` needs to be serialized as a number, not string
 - this doesn't work anyway -- the client-side gets the hints, but they don't display

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-03-07 16:49:12 +00:00
..
src Add missing parameter 2022-03-07 15:42:20 +02:00
tests Bump vscode-test 2021-12-03 20:40:29 +02:00
.eslintignore vscode extension: use esbuild instead of rollup. 2021-08-10 10:18:08 +01:00
.eslintrc.js Fix eslint errors 2022-02-06 06:52:51 +08:00
.gitignore Add experimental VSCode api 2022-03-04 07:45:51 +02:00
.vscodeignore Prepare Code extension for bundling 2021-12-18 17:44:16 +02:00
icon.png Extension icon 2020-01-15 16:07:39 +01:00
language-configuration.json fix: remove pipe from surroundingPairs 2022-01-17 20:08:39 +00:00
LICENSE Add LICENSE file to make vsce happy 2021-12-04 12:29:27 +02:00
package-lock.json Bump esbuild 2022-03-07 15:24:42 +02:00
package.json Merge #11445 2022-03-07 16:49:12 +00:00
ra_syntax_tree.tmGrammar.json Fix .rast tmGrammar to account for numbers in identifiers 2020-04-22 02:00:58 +03:00
README.md Update README.md 2022-01-30 14:21:52 +01:00
tsconfig.eslint.json Fix eslint errors 2022-02-06 06:52:51 +08:00
tsconfig.json Clean up the redundant hints code and config 2022-03-04 07:45:51 +02:00

rust-analyzer

Provides support for rust-analyzer: novel LSP server for the Rust programming language.

Note the extension may cause conflicts with the official Rust extension. It is recommended to disable the Rust extension when using the rust-analyzer extension.

Sponsor

Work on rust-analyzer is sponsored by

Ferrous Systems

If you want to sponsor:

Features

Quick start

  1. Install rustup
  2. Install the rust-analyzer extension

Configuration

This extension provides configurations through VSCode's configuration settings. All the configurations are under rust-analyzer.*.

See https://rust-analyzer.github.io/manual.html#vs-code-2 for more information on VSCode specific configurations.

Communication

For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum:

https://users.rust-lang.org/c/ide/14

Documentation

See https://rust-analyzer.github.io/ for more information.