diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-22 00:18:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-22 00:18:19 +0100 |
commit | ae24651e445444d4ed4275a717ac10980f2957a4 (patch) | |
tree | 9ae9115957ab35a3bc7d2d446bce72031328af1a /editors/code/package.json | |
parent | 5b6c0c1af290996a407fb4be51e852317dfab7c2 (diff) | |
parent | 463ecefc64a48d80b2c4591fd4a1b82ae62b2897 (diff) |
Merge #8916
8916: ItemTree pretty-printing r=jonas-schievink a=jonas-schievink
This adds a printer for `ItemTree` contents, and a few tests to ensure that `ItemTree` lowering works like we expect it to. It also adds a new "Debug ItemTree" command that can be used to see the `ItemTree` of the currently open file. The pretty-printed output is usually close enough to Rust syntax that we can even use Rust syntax highlighting.
This is similar to the old `ItemTree` tests we had, but produces significantly more readable output, so these should actually carry their weight.
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'editors/code/package.json')
-rw-r--r-- | editors/code/package.json | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 1743b374c..17d9281ff 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -110,6 +110,11 @@ | |||
110 | "category": "Rust Analyzer" | 110 | "category": "Rust Analyzer" |
111 | }, | 111 | }, |
112 | { | 112 | { |
113 | "command": "rust-analyzer.viewItemTree", | ||
114 | "title": "Debug ItemTree", | ||
115 | "category": "Rust Analyzer" | ||
116 | }, | ||
117 | { | ||
113 | "command": "rust-analyzer.viewCrateGraph", | 118 | "command": "rust-analyzer.viewCrateGraph", |
114 | "title": "View Crate Graph", | 119 | "title": "View Crate Graph", |
115 | "category": "Rust Analyzer" | 120 | "category": "Rust Analyzer" |