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

Expose context flag defined in terms of "# of enclosing tree-sitter AST nodes"? #55

Open
helixbass opened this issue Jul 12, 2023 · 1 comment

Comments

@helixbass
Copy link
Owner

It strikes me that (vs --after-context/--before-context) we could provide a "smarter" context where you could declaratively say eg "show me one level of AST parent above matching nodes as context"?

@helixbass
Copy link
Owner Author

Thinking about this a little bit, it does sound like an intuitive/possibly useful feature

But I think the implementation would be pretty non-trivial, it looks like it would involve "wiring up" a tree_sitter::Node-aware idea of "context" through at least the searcher

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

No branches or pull requests

1 participant