Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update syntax tree viewer docs #18957

Merged
merged 1 commit into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: Syntax Tree` shows syntax tree of the current file/selection.

* `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
rust code that it refers to and the rust editor will also highlight the proper
text range.
* 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.

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,
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.

![demo](https://user-images.githubusercontent.com/36276403/78225773-6636a480-74d3-11ea-9d9f-1c9d42da03b0.png)
You can click on `Copy` next to a syntax node to copy a text representation of the node.

![demo](https://github.com/user-attachments/assets/2d20ae87-0abf-495f-bee8-54aa2494a00d)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you make this URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I edited the markdown file on the github website, and dragged in the video file.
https://github.blog/news-insights/product-news/video-uploads-available-github/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is interesting. The link you get when you paste an image doesn't have that annoying JWT, and probably doesn't expire.


## Profiling

Expand Down
Loading