Add Search modal for project-wide text search#46478
Add Search modal for project-wide text search#46478ozacod wants to merge 94 commits intozed-industries:mainfrom
Conversation
|
I noticed PR #44530 mid-development. While the functionality is similar, I am submitting this as an alternative implementation because it reuses the existing search logic, which might keep the codebase simpler. Happy to discuss which approach is preferred. |
8f5aa46 to
f6bf001
Compare
Completed Features
I would appreciate any feedback or suggestions, and ideas on how to improve further. |
|
I was one of the original people to request this. You've absolutely perfected what I had in mind! I think this intellij-style quick popup instant search is an excellent alternative to the dedicated search tab. Thank you @ozacod!!! |
|
This looks nice, I use vim splits and I always get a little confused on how zed opens the project wide search on the split I am on instead of a modal like it does for the file search. Would it be possible to open files on vertical/horizontal splits with this? |
|
Not a maintainer but I looked through the code and it looks good imo. Very clean implementation. Also cloned ur fork and tested it out on my machine and it works exactly how I thought it would. Great job <3 |
|
The other implementation seems to be getting more traction (it's been around a bit longer, to be fair), but coming from Jetbrains-based IDEs I much prefer this one. Hopefully this one can be considered too! |
|
This PR has ~1,000 fewer lines than the other one, which is a huge advantage. |
|
This PR seems to answer most of the concerns of #8279 |
|
@ozacod thanks for your PR, was waiting for something like this for almost a year. Is it possible to scroll the code in search using keyboard? I see that you can use mouse to scroll it, but can we do this using keyboard without leaving the search bar? Let's say I search for |
|
@rushter |
|
Hi @maxbrunsfeld , this is ready for review. I built this by reusing nearly all the existing project-search logic, so the actual new code contribution is quite small. I tried to address the visual and UI concerns raised in the discussions. I'd appreciate a look when you have time. |
|
I haven't pushed this last change to avoid overcomplicating the current PR, but I wanted to demonstrate that the layout is indeed toggleable between IntelliJ and Telescope styles. I believe it will satisfy both preferences. Their functionalities etc are exactly same, just layout is different. |
Now it's great! Thanks. Talking about performance, I’ve noticed a case where the search modal struggles on my machine. It happens when When searching for |
|
@ozacod wonderful work on this PR! You really went above and beyond by literally maintaining it for months! It's my goal for the next few weeks to land this. Let's see how far we can get. In the next few days I'll be diving into the implementation fixing small stuff as I see them. I'll surface any bigger concerns here so we can discuss them. Its high time we have 🔭 in Zed |
|
@yara-blue Thank you. I really enjoyed working with the community to bring these features to life. They gave incredible feedback throughout the process. I think this may even exceed the expectations, since it gives users to the flexibility if both Intellij-style and telescope-style views. |
|
Very much looking forward to this thank you @ozacod |
It is way better now. Thanks @gustavotrott |
|
Oh yeah, can we have |
Did you mean pre-filling the search with the current editor selection? If so, it's already wired up. |
|
Thanks. |
|
May I ask one more question if It would be useful to traverse through old codebases where a function span thousand of lines. |
it is available for single buffer search in Zed. Since quick-search or current project-search (cmd+shift+f) covers multi buffer, I don't see a meaningful application. |
|
You are right. My inquiry is not a meaningful necessity. Hope that clears things up. I will be grateful if u would let me know if u will be considering implementing this, not be implementing this but would open to contributions, or not be accepting this feature request at all. |
566c50c to
09d577e
Compare
happily! We are doing quality week now so that comes in between unfortunately. But soon ill be on this. @ask4fusora The PR is already huge (understandable for the feature). I'd like to keep this as is (ofc bugfixes are welcome!) until it's landed in Zed. Once it's landed that is most certainly not the end of it! At that point we'll look at where to take the feature next, ideas and contributions from the community will again be most welcome then! But now we need to take a pause and focus on getting telescope landed. |











Closes #8279
Implemented a new modal for project-wide search. This reuses the logic from the existing search implementation but presents it in a popup window for better accessibility.
quick_search.mov
Release Notes: