Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "show AST" command, based on textDocument/ast extension. #104

Merged
merged 2 commits into from
Jan 8, 2021
Merged

Conversation

sam-mccall
Copy link
Member

See llvm/llvm-project@8adc4d1
This extension is new, so the feature doesn't work with clangd 11 and earlier.

2020-11-20-134221_1126x790_scrot

Implementation is pretty similar to memoryusage (though a bit simpler I think)

Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general point; it might be nice to have some pointers for the possible values of "roles" and "kinds". Currently it feels like magic when reading the mappings. I suppose it is OK for now, but it might be a hard-to-discover concept for outsiders.

src/ast.ts Outdated Show resolved Hide resolved
src/ast.ts Outdated Show resolved Hide resolved
src/ast.ts Outdated Show resolved Hide resolved
src/ast.ts Outdated Show resolved Hide resolved
src/ast.ts Outdated Show resolved Hide resolved
See llvm/llvm-project@8adc4d1
This extension is new, so the feature doesn't work with clangd 11 and earlier.
@sam-mccall
Copy link
Member Author

As a general point; it might be nice to have some pointers for the possible values of "roles" and "kinds". Currently it feels like magic when reading the mappings. I suppose it is OK for now, but it might be a hard-to-discover concept for outsiders.

Yeah, added a link to the source code and repeated a bit what these are.

It's a bit weird and coupled, but it works and I can't think of a better alternative. (I don't think "no icons" is actually better!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants