be84f85c1d
Some features of rust-analyzer requires support for custom commands on the client side. Specifically, hover & code lens need this. Stock LSP doesn't have a way for the server to know which client-side commands are available. For that reason, we historically were just sending the commands, not worrying whether the client supports then or not. That's not really great though, so in this PR we add infrastructure for the client to explicitly opt-into custom commands, via `extensions` field of the ClientCapabilities. To preserve backwards compatability, if the client doesn't set the field, we assume that it does support all custom commands. In the future, we'll start treating that case as if the client doesn't support commands. So, if you maintain a rust-analyzer client and implement `rust-analyzer/runSingle` and such, please also advertise this via a capability. |
||
---|---|---|
.. | ||
src | ||
tests | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.vscodeignore | ||
icon.png | ||
language-configuration.json | ||
package-lock.json | ||
package.json | ||
ra_syntax_tree.tmGrammar.json | ||
README.md | ||
rollup.config.js | ||
tsconfig.json |
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.
Note the project is in alpha status: it is already useful in practice, but can't be considered stable.
Sponsor
Work on rust-analyzer is sponsored by
If you want to sponsor:
Features
- code completion, imports insertion
- go to definition, implementation, type definition
- find all references, workspace symbol search, rename
- types and documentation on hover
- inlay hints
- semantic syntax highlighting
- a lot of assist(code actions)
- apply suggestions from errors
- ... and many more, checkout the manual to see them all
Quick start
- Install rustup
- 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.