about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/docs/dev
diff options
context:
space:
mode:
authorGiga Bowser <45986823+Giga-Bowser@users.noreply.github.com>2024-12-20 19:12:04 -0500
committerGiga Bowser <45986823+Giga-Bowser@users.noreply.github.com>2025-01-09 13:20:06 -0600
commit78c377f956ffb7c9d1cd5d1786f8873959681f50 (patch)
tree849b3e180a629bafd27abbe8c7695bf738142b9b /src/tools/rust-analyzer/docs/dev
parentd8eb839305a43521b155cf741210a5c11a188924 (diff)
Add a new and improved syntax tree viewer
Diffstat (limited to 'src/tools/rust-analyzer/docs/dev')
-rw-r--r--src/tools/rust-analyzer/docs/dev/lsp-extensions.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
index 21ac3a5a269..8cd04227738 100644
--- a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
+++ b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
@@ -1,5 +1,5 @@
 <!---
-lsp/ext.rs hash: 6dd762ae19630ec0
+lsp/ext.rs hash: a85494375e528064
 
 If you need to change the above hash to make the test pass, please check if you
 need to adjust this doc as well and ping this issue:
@@ -710,6 +710,23 @@ interface SyntaxTreeParams {
 Returns textual representation of a parse tree for the file/selected region.
 Primarily for debugging, but very useful for all people working on rust-analyzer itself.
 
+## View Syntax Tree
+
+**Method:** `rust-analyzer/viewSyntaxTree`
+
+**Request:**
+
+```typescript
+interface ViewSyntaxTreeParams {
+    textDocument: TextDocumentIdentifier,
+}
+```
+
+**Response:** `string`
+
+Returns json representation of the file's syntax tree.
+Used to create a treeView for debugging and working on rust-analyzer itself.
+
 ## View Hir
 
 **Method:** `rust-analyzer/viewHir`