clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
594 stars 97 forks source link

Give nodes in the AST view a "copy subtree as JSON" context menu item #538

Open HighCommander4 opened 9 months ago

HighCommander4 commented 9 months ago

vscode-clangd's "AST view" feature is a convenient way to look at the AST for a fragment of code you're interested in.

Sometimes, you want to share such a fragment with someone else, and to this end it would be convenient if the nodes in the AST view had a context menu item which copies the AST info of that node's subtree in JSON format.

The source data from the server is already in JSON, so this should be fairly straightforward to implement.