mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
Fix r-a spelling in some places
This commit is contained in:
parent
5edbdd127a
commit
bd7dfac5eb
28 changed files with 64 additions and 64 deletions
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -19,7 +19,7 @@ Before submitting, please make sure that you're not running into one of these kn
|
||||||
Otherwise please try to provide information which will help us to fix the issue faster. Minimal reproducible examples with few dependencies are especially lovely <3.
|
Otherwise please try to provide information which will help us to fix the issue faster. Minimal reproducible examples with few dependencies are especially lovely <3.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
**rust-analyzer version**: (eg. output of "Rust Analyzer: Show RA Version" command)
|
**rust-analyzer version**: (eg. output of "rust-analyzer: Show RA Version" command)
|
||||||
|
|
||||||
**rustc version**: (eg. output of `rustc -V`)
|
**rustc version**: (eg. output of `rustc -V`)
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Rust analyzer is primarily distributed under the terms of both the MIT
|
rust-analyzer is primarily distributed under the terms of both the MIT
|
||||||
license and the Apache License (Version 2.0).
|
license and the Apache License (Version 2.0).
|
||||||
|
|
||||||
See LICENSE-APACHE and LICENSE-MIT for details.
|
See LICENSE-APACHE and LICENSE-MIT for details.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
//! unaffected, so we don't have to recompute name resolution results or item data (see `data.rs`).
|
//! unaffected, so we don't have to recompute name resolution results or item data (see `data.rs`).
|
||||||
//!
|
//!
|
||||||
//! The `ItemTree` for the currently open file can be displayed by using the VS Code command
|
//! The `ItemTree` for the currently open file can be displayed by using the VS Code command
|
||||||
//! "Rust Analyzer: Debug ItemTree".
|
//! "rust-analyzer: Debug ItemTree".
|
||||||
//!
|
//!
|
||||||
//! Compared to rustc's architecture, `ItemTree` has properties from both rustc's AST and HIR: many
|
//! Compared to rustc's architecture, `ItemTree` has properties from both rustc's AST and HIR: many
|
||||||
//! syntax-level Rust features are already desugared to simpler forms in the `ItemTree`, but name
|
//! syntax-level Rust features are already desugared to simpler forms in the `ItemTree`, but name
|
||||||
|
|
|
@ -45,7 +45,7 @@ impl RootDatabase {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Memory Usage (Clears Database)**
|
// | VS Code | **rust-analyzer: Memory Usage (Clears Database)**
|
||||||
// |===
|
// |===
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065592-08559f00-91b1-11eb-8c96-64b88068ec02.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065592-08559f00-91b1-11eb-8c96-64b88068ec02.gif[]
|
||||||
pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes)> {
|
pub fn per_query_memory_usage(&mut self) -> Vec<(String, Bytes)> {
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Structural Search Replace**
|
// | VS Code | **rust-analyzer: Structural Search Replace**
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// Also available as an assist, by writing a comment containing the structural
|
// Also available as an assist, by writing a comment containing the structural
|
||||||
|
|
|
@ -19,7 +19,7 @@ pub struct ExpandedMacro {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Expand macro recursively**
|
// | VS Code | **rust-analyzer: Expand macro recursively**
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113020648-b3973180-917a-11eb-84a9-ecb921293dc5.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113020648-b3973180-917a-11eb-84a9-ecb921293dc5.gif[]
|
||||||
|
@ -32,7 +32,7 @@ pub(crate) fn expand_macro(db: &RootDatabase, position: FilePosition) -> Option<
|
||||||
_ => 0,
|
_ => 0,
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// due to how Rust Analyzer works internally, we need to special case derive attributes,
|
// due to how rust-analyzer works internally, we need to special case derive attributes,
|
||||||
// otherwise they might not get found, e.g. here with the cursor at $0 `#[attr]` would expand:
|
// otherwise they might not get found, e.g. here with the cursor at $0 `#[attr]` would expand:
|
||||||
// ```
|
// ```
|
||||||
// #[attr]
|
// #[attr]
|
||||||
|
|
|
@ -100,7 +100,7 @@ pub enum InlayTooltip {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Toggle inlay hints*
|
// | VS Code | **rust-analyzer: Toggle inlay hints*
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917a-11eb-8d70-3be3fd558cdd.png[]
|
// image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917a-11eb-8d70-3be3fd558cdd.png[]
|
||||||
|
|
|
@ -28,7 +28,7 @@ pub struct JoinLinesConfig {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Join lines**
|
// | VS Code | **rust-analyzer: Join lines**
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917a-11eb-87c4-b75acc028f11.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917a-11eb-87c4-b75acc028f11.gif[]
|
||||||
|
|
|
@ -12,7 +12,7 @@ use syntax::{
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Find matching brace**
|
// | VS Code | **rust-analyzer: Find matching brace**
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065573-04298180-91b1-11eb-8dec-d4e2a202f304.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065573-04298180-91b1-11eb-8dec-d4e2a202f304.gif[]
|
||||||
|
|
|
@ -19,8 +19,8 @@ pub enum Direction {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Move item up**
|
// | VS Code | **rust-analyzer: Move item up**
|
||||||
// | VS Code | **Rust Analyzer: Move item down**
|
// | VS Code | **rust-analyzer: Move item down**
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065576-04298180-91b1-11eb-91ce-4505e99ed598.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065576-04298180-91b1-11eb-91ce-4505e99ed598.gif[]
|
||||||
|
|
|
@ -18,7 +18,7 @@ use crate::NavigationTarget;
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Locate parent module**
|
// | VS Code | **rust-analyzer: Locate parent module**
|
||||||
// |===
|
// |===
|
||||||
//
|
//
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065580-04c21800-91b1-11eb-9a32-00086161c0bd.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065580-04c21800-91b1-11eb-9a32-00086161c0bd.gif[]
|
||||||
|
|
|
@ -116,7 +116,7 @@ impl Runnable {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Run**
|
// | VS Code | **rust-analyzer: Run**
|
||||||
// |===
|
// |===
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b1-11eb-958f-d67efcaf6a2f.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b1-11eb-958f-d67efcaf6a2f.gif[]
|
||||||
pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
|
pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
|
||||||
|
@ -202,7 +202,7 @@ pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Peek related tests**
|
// | VS Code | **rust-analyzer: Peek related tests**
|
||||||
// |===
|
// |===
|
||||||
pub(crate) fn related_tests(
|
pub(crate) fn related_tests(
|
||||||
db: &RootDatabase,
|
db: &RootDatabase,
|
||||||
|
|
|
@ -12,7 +12,7 @@ use ide_db::{
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Shuffle Crate Graph**
|
// | VS Code | **rust-analyzer: Shuffle Crate Graph**
|
||||||
// |===
|
// |===
|
||||||
pub(crate) fn shuffle_crate_graph(db: &mut RootDatabase) {
|
pub(crate) fn shuffle_crate_graph(db: &mut RootDatabase) {
|
||||||
let crate_graph = db.crate_graph();
|
let crate_graph = db.crate_graph();
|
||||||
|
|
|
@ -29,7 +29,7 @@ fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats {
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Status**
|
// | VS Code | **rust-analyzer: Status**
|
||||||
// |===
|
// |===
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065584-05f34500-91b1-11eb-98cc-5c196f76be7f.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065584-05f34500-91b1-11eb-98cc-5c196f76be7f.gif[]
|
||||||
pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
|
pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
|
||||||
|
|
|
@ -12,7 +12,7 @@ use syntax::{
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Show Syntax Tree**
|
// | VS Code | **rust-analyzer: Show Syntax Tree**
|
||||||
// |===
|
// |===
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065586-068bdb80-91b1-11eb-9507-fee67f9f45a0.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065586-068bdb80-91b1-11eb-9507-fee67f9f45a0.gif[]
|
||||||
pub(crate) fn syntax_tree(
|
pub(crate) fn syntax_tree(
|
||||||
|
|
|
@ -16,7 +16,7 @@ use ide_db::{
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: View Crate Graph**
|
// | VS Code | **rust-analyzer: View Crate Graph**
|
||||||
// |===
|
// |===
|
||||||
pub(crate) fn view_crate_graph(db: &RootDatabase, full: bool) -> Result<String, String> {
|
pub(crate) fn view_crate_graph(db: &RootDatabase, full: bool) -> Result<String, String> {
|
||||||
let crate_graph = db.crate_graph();
|
let crate_graph = db.crate_graph();
|
||||||
|
|
|
@ -8,7 +8,7 @@ use syntax::{algo::find_node_at_offset, ast, AstNode};
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: View Hir**
|
// | VS Code | **rust-analyzer: View Hir**
|
||||||
// |===
|
// |===
|
||||||
// image::https://user-images.githubusercontent.com/48062697/113065588-068bdb80-91b1-11eb-9a78-0b4ef1e972fb.gif[]
|
// image::https://user-images.githubusercontent.com/48062697/113065588-068bdb80-91b1-11eb-9a78-0b4ef1e972fb.gif[]
|
||||||
pub(crate) fn view_hir(db: &RootDatabase, position: FilePosition) -> String {
|
pub(crate) fn view_hir(db: &RootDatabase, position: FilePosition) -> String {
|
||||||
|
|
|
@ -9,7 +9,7 @@ use ide_db::RootDatabase;
|
||||||
// |===
|
// |===
|
||||||
// | Editor | Action Name
|
// | Editor | Action Name
|
||||||
//
|
//
|
||||||
// | VS Code | **Rust Analyzer: Debug ItemTree**
|
// | VS Code | **rust-analyzer: Debug ItemTree**
|
||||||
// |===
|
// |===
|
||||||
pub(crate) fn view_item_tree(db: &RootDatabase, file_id: FileId) -> String {
|
pub(crate) fn view_item_tree(db: &RootDatabase, file_id: FileId) -> String {
|
||||||
db.file_item_tree(file_id.into()).pretty_print()
|
db.file_item_tree(file_id.into()).pretty_print()
|
||||||
|
|
|
@ -60,7 +60,7 @@ impl MacroDylib {
|
||||||
|
|
||||||
let info = version::read_dylib_info(&path)?;
|
let info = version::read_dylib_info(&path)?;
|
||||||
if info.version.0 < 1 || info.version.1 < 47 {
|
if info.version.0 < 1 || info.version.1 < 47 {
|
||||||
let msg = format!("proc-macro {} built by {:#?} is not supported by Rust Analyzer, please update your rust version.", path.display(), info);
|
let msg = format!("proc-macro {} built by {:#?} is not supported by rust-analyzer, please update your Rust version.", path.display(), info);
|
||||||
return Err(io::Error::new(io::ErrorKind::InvalidData, msg));
|
return Err(io::Error::new(io::ErrorKind::InvalidData, msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
//! compiler into submodules of this module (e.g proc_macro_srv::abis::abi_1_47).
|
//! compiler into submodules of this module (e.g proc_macro_srv::abis::abi_1_47).
|
||||||
//!
|
//!
|
||||||
//! All of these ABIs are subsumed in the `Abi` enum, which exposes a simple
|
//! All of these ABIs are subsumed in the `Abi` enum, which exposes a simple
|
||||||
//! interface the rest of rust analyzer can use to talk to the macro
|
//! interface the rest of rust-analyzer can use to talk to the macro
|
||||||
//! provider.
|
//! provider.
|
||||||
//!
|
//!
|
||||||
//! # Adding a new ABI
|
//! # Adding a new ABI
|
||||||
|
|
|
@ -19,7 +19,7 @@ use crate::{utf8_stdout, ManifestPath};
|
||||||
/// [`CargoWorkspace`] represents the logical structure of, well, a Cargo
|
/// [`CargoWorkspace`] represents the logical structure of, well, a Cargo
|
||||||
/// workspace. It pretty closely mirrors `cargo metadata` output.
|
/// workspace. It pretty closely mirrors `cargo metadata` output.
|
||||||
///
|
///
|
||||||
/// Note that internally, rust analyzer uses a different structure:
|
/// Note that internally, rust-analyzer uses a different structure:
|
||||||
/// `CrateGraph`. `CrateGraph` is lower-level: it knows only about the crates,
|
/// `CrateGraph`. `CrateGraph` is lower-level: it knows only about the crates,
|
||||||
/// while this knows about `Packages` & `Targets`: purely cargo-related
|
/// while this knows about `Packages` & `Targets`: purely cargo-related
|
||||||
/// concepts.
|
/// concepts.
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
//! code here exercise this specific completion, and thus have a fast
|
//! code here exercise this specific completion, and thus have a fast
|
||||||
//! edit/compile/test cycle.
|
//! edit/compile/test cycle.
|
||||||
//!
|
//!
|
||||||
//! Note that "Rust Analyzer: Run" action does not allow running a single test
|
//! Note that "rust-analyzer: Run" action does not allow running a single test
|
||||||
//! in release mode in VS Code. There's however "Rust Analyzer: Copy Run Command Line"
|
//! in release mode in VS Code. There's however "rust-analyzer: Copy Run Command Line"
|
||||||
//! which you can use to paste the command in terminal and add `--release` manually.
|
//! which you can use to paste the command in terminal and add `--release` manually.
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! Syntax Tree library used throughout the rust analyzer.
|
//! Syntax Tree library used throughout the rust-analyzer.
|
||||||
//!
|
//!
|
||||||
//! Properties:
|
//! Properties:
|
||||||
//! - easy and fast incremental re-parsing
|
//! - easy and fast incremental re-parsing
|
||||||
|
|
|
@ -82,7 +82,7 @@ There's **"Run Extension (Debug Build)"** launch configuration for this in VS Co
|
||||||
In general, I use one of the following workflows for fixing bugs and implementing features:
|
In general, I use one of the following workflows for fixing bugs and implementing features:
|
||||||
|
|
||||||
If the problem concerns only internal parts of rust-analyzer (i.e. I don't need to touch the `rust-analyzer` crate or TypeScript code), there is a unit-test for it.
|
If the problem concerns only internal parts of rust-analyzer (i.e. I don't need to touch the `rust-analyzer` crate or TypeScript code), there is a unit-test for it.
|
||||||
So, I use **Rust Analyzer: Run** action in VS Code to run this single test, and then just do printf-driven development/debugging.
|
So, I use **rust-analyzer: Run** action in VS Code to run this single test, and then just do printf-driven development/debugging.
|
||||||
As a sanity check after I'm done, I use `cargo xtask install --server` and **Reload Window** action in VS Code to verify that the thing works as I expect.
|
As a sanity check after I'm done, I use `cargo xtask install --server` and **Reload Window** action in VS Code to verify that the thing works as I expect.
|
||||||
|
|
||||||
If the problem concerns only the VS Code extension, I use **Run Installed Extension** launch configuration from `launch.json`.
|
If the problem concerns only the VS Code extension, I use **Run Installed Extension** launch configuration from `launch.json`.
|
||||||
|
@ -152,11 +152,11 @@ To log all communication between the server and the client, there are two choice
|
||||||
|
|
||||||
There are also several VS Code commands which might be of interest:
|
There are also several VS Code commands which might be of interest:
|
||||||
|
|
||||||
* `Rust Analyzer: Status` shows some memory-usage statistics.
|
* `rust-analyzer: Status` shows some memory-usage statistics.
|
||||||
|
|
||||||
* `Rust Analyzer: Syntax Tree` shows syntax tree of the current file/selection.
|
* `rust-analyzer: Syntax Tree` shows syntax tree of the current file/selection.
|
||||||
|
|
||||||
* `Rust Analyzer: View Hir` shows the HIR expressions within the function containing the cursor.
|
* `rust-analyzer: View Hir` shows the HIR expressions within the function containing the cursor.
|
||||||
|
|
||||||
You can hover over syntax nodes in the opened text file to see the appropriate
|
You can hover over syntax nodes in the opened text file to see the appropriate
|
||||||
rust code that it refers to and the rust editor will also highlight the proper
|
rust code that it refers to and the rust editor will also highlight the proper
|
||||||
|
|
|
@ -371,7 +371,7 @@ That is, rust-analyzer requires unwinding.
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
Rust Analyzer has three interesting [system boundaries](https://www.tedinski.com/2018/04/10/making-tests-a-positive-influence-on-design.html) to concentrate tests on.
|
rust-analyzer has three interesting [system boundaries](https://www.tedinski.com/2018/04/10/making-tests-a-positive-influence-on-design.html) to concentrate tests on.
|
||||||
|
|
||||||
The outermost boundary is the `rust-analyzer` crate, which defines an LSP interface in terms of stdio.
|
The outermost boundary is the `rust-analyzer` crate, which defines an LSP interface in terms of stdio.
|
||||||
We do integration testing of this component, by feeding it with a stream of LSP requests and checking responses.
|
We do integration testing of this component, by feeding it with a stream of LSP requests and checking responses.
|
||||||
|
|
|
@ -63,7 +63,7 @@ Next, let's talk about what the inputs to the `Analysis` are, precisely.
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
Rust Analyzer never does any I/O itself, all inputs get passed explicitly via
|
rust-analyzer never does any I/O itself, all inputs get passed explicitly via
|
||||||
the `AnalysisHost::apply_change` method, which accepts a single argument, a
|
the `AnalysisHost::apply_change` method, which accepts a single argument, a
|
||||||
`Change`. [`Change`] is a builder for a single change
|
`Change`. [`Change`] is a builder for a single change
|
||||||
"transaction", so it suffices to study its methods to understand all of the
|
"transaction", so it suffices to study its methods to understand all of the
|
||||||
|
|
|
@ -479,7 +479,7 @@ You can follow instructions for installing <<rust-analyzer-language-server-binar
|
||||||
== Troubleshooting
|
== Troubleshooting
|
||||||
|
|
||||||
Start with looking at the rust-analyzer version.
|
Start with looking at the rust-analyzer version.
|
||||||
Try **Rust Analyzer: Show RA Version** in VS Code (using **Command Palette** feature typically activated by Ctrl+Shift+P) or `rust-analyzer --version` in the command line.
|
Try **rust-analyzer: Show RA Version** in VS Code (using **Command Palette** feature typically activated by Ctrl+Shift+P) or `rust-analyzer --version` in the command line.
|
||||||
If the date is more than a week ago, it's better to update rust-analyzer version.
|
If the date is more than a week ago, it's better to update rust-analyzer version.
|
||||||
|
|
||||||
The next thing to check would be panic messages in rust-analyzer's log.
|
The next thing to check would be panic messages in rust-analyzer's log.
|
||||||
|
@ -492,7 +492,7 @@ To fully capture LSP messages between the editor and the server, set `"rust-anal
|
||||||
The root cause for many "`nothing works`" problems is that rust-analyzer fails to understand the project structure.
|
The root cause for many "`nothing works`" problems is that rust-analyzer fails to understand the project structure.
|
||||||
To debug that, first note the `rust-analyzer` section in the status bar.
|
To debug that, first note the `rust-analyzer` section in the status bar.
|
||||||
If it has an error icon and red, that's the problem (hover will have somewhat helpful error message).
|
If it has an error icon and red, that's the problem (hover will have somewhat helpful error message).
|
||||||
**Rust Analyzer: Status** prints dependency information for the current file.
|
**rust-analyzer: Status** prints dependency information for the current file.
|
||||||
Finally, `RA_LOG=project_model=debug` enables verbose logs during project loading.
|
Finally, `RA_LOG=project_model=debug` enables verbose logs during project loading.
|
||||||
|
|
||||||
If rust-analyzer outright crashes, try running `rust-analyzer analysis-stats /path/to/project/directory/` on the command line.
|
If rust-analyzer outright crashes, try running `rust-analyzer analysis-stats /path/to/project/directory/` on the command line.
|
||||||
|
|
|
@ -99,142 +99,142 @@
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.syntaxTree",
|
"command": "rust-analyzer.syntaxTree",
|
||||||
"title": "Show Syntax Tree",
|
"title": "Show Syntax Tree",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.viewHir",
|
"command": "rust-analyzer.viewHir",
|
||||||
"title": "View Hir",
|
"title": "View Hir",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.viewFileText",
|
"command": "rust-analyzer.viewFileText",
|
||||||
"title": "View File Text (as seen by the server)",
|
"title": "View File Text (as seen by the server)",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.viewItemTree",
|
"command": "rust-analyzer.viewItemTree",
|
||||||
"title": "Debug ItemTree",
|
"title": "Debug ItemTree",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.viewCrateGraph",
|
"command": "rust-analyzer.viewCrateGraph",
|
||||||
"title": "View Crate Graph",
|
"title": "View Crate Graph",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.viewFullCrateGraph",
|
"command": "rust-analyzer.viewFullCrateGraph",
|
||||||
"title": "View Crate Graph (Full)",
|
"title": "View Crate Graph (Full)",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.expandMacro",
|
"command": "rust-analyzer.expandMacro",
|
||||||
"title": "Expand macro recursively",
|
"title": "Expand macro recursively",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.matchingBrace",
|
"command": "rust-analyzer.matchingBrace",
|
||||||
"title": "Find matching brace",
|
"title": "Find matching brace",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.parentModule",
|
"command": "rust-analyzer.parentModule",
|
||||||
"title": "Locate parent module",
|
"title": "Locate parent module",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.joinLines",
|
"command": "rust-analyzer.joinLines",
|
||||||
"title": "Join lines",
|
"title": "Join lines",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.run",
|
"command": "rust-analyzer.run",
|
||||||
"title": "Run",
|
"title": "Run",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.copyRunCommandLine",
|
"command": "rust-analyzer.copyRunCommandLine",
|
||||||
"title": "Copy Run Command Line",
|
"title": "Copy Run Command Line",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.debug",
|
"command": "rust-analyzer.debug",
|
||||||
"title": "Debug",
|
"title": "Debug",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.newDebugConfig",
|
"command": "rust-analyzer.newDebugConfig",
|
||||||
"title": "Generate launch configuration",
|
"title": "Generate launch configuration",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.analyzerStatus",
|
"command": "rust-analyzer.analyzerStatus",
|
||||||
"title": "Status",
|
"title": "Status",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.memoryUsage",
|
"command": "rust-analyzer.memoryUsage",
|
||||||
"title": "Memory Usage (Clears Database)",
|
"title": "Memory Usage (Clears Database)",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.shuffleCrateGraph",
|
"command": "rust-analyzer.shuffleCrateGraph",
|
||||||
"title": "Shuffle Crate Graph",
|
"title": "Shuffle Crate Graph",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.reloadWorkspace",
|
"command": "rust-analyzer.reloadWorkspace",
|
||||||
"title": "Reload workspace",
|
"title": "Reload workspace",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.reload",
|
"command": "rust-analyzer.reload",
|
||||||
"title": "Restart server",
|
"title": "Restart server",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.onEnter",
|
"command": "rust-analyzer.onEnter",
|
||||||
"title": "Enhanced enter key",
|
"title": "Enhanced enter key",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.ssr",
|
"command": "rust-analyzer.ssr",
|
||||||
"title": "Structural Search Replace",
|
"title": "Structural Search Replace",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.serverVersion",
|
"command": "rust-analyzer.serverVersion",
|
||||||
"title": "Show RA Version",
|
"title": "Show RA Version",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.toggleInlayHints",
|
"command": "rust-analyzer.toggleInlayHints",
|
||||||
"title": "Toggle inlay hints",
|
"title": "Toggle inlay hints",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.openDocs",
|
"command": "rust-analyzer.openDocs",
|
||||||
"title": "Open docs under cursor",
|
"title": "Open docs under cursor",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.openCargoToml",
|
"command": "rust-analyzer.openCargoToml",
|
||||||
"title": "Open Cargo.toml",
|
"title": "Open Cargo.toml",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.peekTests",
|
"command": "rust-analyzer.peekTests",
|
||||||
"title": "Peek related tests",
|
"title": "Peek related tests",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.moveItemUp",
|
"command": "rust-analyzer.moveItemUp",
|
||||||
"title": "Move item up",
|
"title": "Move item up",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "rust-analyzer.moveItemDown",
|
"command": "rust-analyzer.moveItemDown",
|
||||||
"title": "Move item down",
|
"title": "Move item down",
|
||||||
"category": "Rust Analyzer"
|
"category": "rust-analyzer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"keybindings": [
|
"keybindings": [
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
],
|
],
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "Rust Analyzer",
|
"title": "rust-analyzer",
|
||||||
"properties": {
|
"properties": {
|
||||||
"rust-analyzer.cargoRunner": {
|
"rust-analyzer.cargoRunner": {
|
||||||
"type": [
|
"type": [
|
||||||
|
|
Loading…
Reference in a new issue