mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 15:14:32 +00:00
52143a5ac0
feature: teach rust-analyzer to discover `linked_projects` This PR's been a long-time coming, but like the title says, it introduces server-side project discovery and removes the extension hooks I previously introduced. I don't think this PR is ready to land, but here are the things I'm feeling squishy about: - I don't think I like the idea of introducing the `cargo-metadata` command-but-for-everything-else in the `flycheck` module, but the progress reporting infrastructure was too convenient to pass up. Happy to move it elsewhere. Here are the things I _know_ I need to change: - For progress reporting, I'm extracting from a `serde_json::Value` that corresponds to `tracing_subsciber::fmt::Layer`'s JSON output. I'd like to make this a bit more structured/documented than the current nonsense I wrote. - The progress reporting currently hardcodes "Buck"; it should be deriving that from the previously mentioned more-structured-output. - This doesn't handle *reloading* when a corresponding buildfile is changed. It should be doing that. <details> <summary>Anyway, here's a video of rust-analyzer discovering a Buck target.</summary> https://github.com/rust-lang/rust-analyzer/assets/2067774/be6cd9b9-2c9a-402d-847f-05f860a91df1 </details> |
||
---|---|---|
.. | ||
src | ||
tests | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.js | ||
.vscodeignore | ||
icon.png | ||
language-configuration.json | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
ra_syntax_tree.tmGrammar.json | ||
README.md | ||
tsconfig.eslint.json | ||
tsconfig.json |
rust-analyzer
This extension provides support for the Rust programming language.
It is recommended over and replaces rust-lang.rust
.
Features
- code completion with imports insertion
- go to definition, implementation, type definition
- find all references, workspace symbol search, symbol renaming
- types and documentation on hover
- inlay hints for types and parameter names
- semantic syntax highlighting
- a lot of assists (code actions)
- apply suggestions from errors
- ... and many more, check out 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 configurations are under rust-analyzer.*
.
See the manual for more information on VSCode specific configurations.
Communication
For usage and troubleshooting requests, please use the "IDEs and Editors" category of the Rust forum.
Documentation
See rust-analyzer.github.io for more information.