Zed is known based on tree-sitter. Is it possible that we can use not only text or regex based search, but also use tree-sitter's query based search?
Sometimes we want to do some accurate search especially when repo is very large when text or regex based search is unusable(search result is too much to read).
And it will be more usable if we can make code navigation programmable(and navigation target is provided by tree-sitter query), here is a example.
func main(){
fmt.Println("hello world")
//^ cursor is here
}
I want to navigate to next function call(which is P's position). I just need write a small tree-sitter query (call_expression) and register it as a custom command(or something else) and bind it in keymap.
If it is possible, I'm willing to implement this under guidance.
If applicable, add mockups / screenshots to help present your vision of the feature
Check for existing issues
Describe the feature
Zed is known based on tree-sitter. Is it possible that we can use not only text or regex based search, but also use tree-sitter's query based search? Sometimes we want to do some accurate search especially when repo is very large when text or regex based search is unusable(search result is too much to read).
And it will be more usable if we can make code navigation programmable(and navigation target is provided by tree-sitter query), here is a example.
I want to navigate to next function call(which is
P
's position). I just need write a small tree-sitter query(call_expression)
and register it as a custom command(or something else) and bind it in keymap.If it is possible, I'm willing to implement this under guidance.
If applicable, add mockups / screenshots to help present your vision of the feature
No response