mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Update syntax tree viewer docs
This commit is contained in:
parent
903bc8133c
commit
1e40500679
@ -154,19 +154,21 @@ 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: 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
|
* If `rust-analyzer.showSyntaxTree` is enabled in settings, `Rust Syntax Tree: Focus on Rust Syntax Tree View` shows the syntax tree of the current file.
|
||||||
rust code that it refers to and the rust editor will also highlight the proper
|
|
||||||
text range.
|
You can click on nodes in the rust editor to go to the corresponding syntax node.
|
||||||
|
|
||||||
|
You can click on `Reveal Syntax Element` next to a syntax node to go to the corresponding rust code and highlight the proper text range.
|
||||||
|
|
||||||
If you trigger Go to Definition in the inspected Rust source file,
|
If you trigger Go to Definition in the inspected Rust source file,
|
||||||
the syntax tree read-only editor should scroll to and select the
|
the syntax tree view should scroll to and select the
|
||||||
appropriate syntax node token.
|
appropriate syntax node token.
|
||||||
|
|
||||||

|
You can click on `Copy` next to a syntax node to copy a text representation of the node.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Profiling
|
## Profiling
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user