Imports Rust-Analyzer's feature for viewing file representations in virtual documents.
New commands:
View Tree Sitter: Same as TS playground
View Syntax Tree: Same as RA's syntax tree viewer. Shows the Rowan tree.
View Format Tree: Shows the Biome's Wadler formatter IR.
View File Representations: Opens all three representations.
Save File Representations: Opens all three representations and pop up a save file dialog to save as zip. Intended for user bug reports.
Internal changes:
New rust_analyzer subfolder containing the vdoc implementation for these commands sourced from the RA extension.
We now have a Ctx context object as in Rust-Analyzer. This was useful to interface with the vdoc helper but it's also a neat way of organising internals. This context holds the LSP client and the VS Code extension context. All features needing access to these receive the context by argument and there is no state in global variables.
New handlers_ext.rs file on the server side to handle the viewFile custom LSP request.
Imports Rust-Analyzer's feature for viewing file representations in virtual documents.
New commands:
Internal changes:
New
rust_analyzer
subfolder containing the vdoc implementation for these commands sourced from the RA extension.We now have a
Ctx
context object as in Rust-Analyzer. This was useful to interface with the vdoc helper but it's also a neat way of organising internals. This context holds the LSP client and the VS Code extension context. All features needing access to these receive the context by argument and there is no state in global variables.New
handlers_ext.rs
file on the server side to handle theviewFile
custom LSP request.