-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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_subtree command for viewing tree-sitter subtree in Popup #1453
Conversation
oh whoops looks like if you do edit: it's not particularly elegant but renaming both the docs and subtree |
ea9d2b8
to
a4a9ba7
Compare
@the-mikedavis This seemed like something for debugging and not that useful for general users, I guess in cases like this since it is only useful for developers, maybe we should not put it as a normal keymap? But current one should be fine, I don't think it is worth having a key by default for this, but if you want, can keep it commented out or something, maybe note somewhere that this is useful for debugging. |
I think I'll probably rebind it in my config to something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍🏻
Perhaps it would be useful as a binding though, in case users have highlighting issues with a grammar they'd be able to dump the subtree for including in the bug report?
I'll make a follow-up PR to hash out a default keybinding 👍 |
show-subtree.mp4
I have this setup for testing but I'm not sure this command really deserves a default binding in the
space+<command>
submap:I kinda just did whatever the rust compiler told me to do, there's probably some wacky stuff in here 😅. In particular the two nested levels of
if let Some(...)
feel a little clumsy, no? Please feel free to pile on the rust style/nitpick reviews 👍Also I think it'd be ideal to run the sexp through a pretty printer, but I left that off in this PR.
What do you think?