about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/docs
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2025-01-10 06:56:34 +0000
committerGitHub <noreply@github.com>2025-01-10 06:56:34 +0000
commit5adca85d1b2d90c8317ddd334d5dca0d7db29a68 (patch)
treece322f057e0278c6fb99c5e2e7826da5f4b92225 /src/tools/rust-analyzer/docs
parent669d34da4618a53ba3b6670c23820c6a8afcf04a (diff)
parent56d06fb40f1f7700ab38bf9208c01541dc560436 (diff)
downloadrust-5adca85d1b2d90c8317ddd334d5dca0d7db29a68.tar.gz
rust-5adca85d1b2d90c8317ddd334d5dca0d7db29a68.zip
Merge pull request #18813 from Giga-Bowser/syntax-tree-view
feat: Add a new and improved syntax tree view
Diffstat (limited to 'src/tools/rust-analyzer/docs')
-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..a632fc6f5fb 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: 2d8604825c458288
 
 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`