Add fuzzy_nucleo crate for order independent file finder search#51164
Add fuzzy_nucleo crate for order independent file finder search#51164yara-blue merged 13 commits intozed-industries:mainfrom
Conversation
|
hey @11happy I had a quick look and this looks pretty much great. I've set some time apart for a thorough review early next week but I expect we can merge this soon thereafter. Thank you so much for this work, I've wanted this for quiet a while! |
|
just some comments not done yet, ill get back to this tomorrow! |
yara-blue
left a comment
There was a problem hiding this comment.
A few small concerns otherwise looks great. Let me know when it's ready for another review :)
Sure Thank you for the review, I will ping once I have addressed all the comments.
I think its better to adress in this one only, I will try to fix this as well. Thank you |
|
ping! @yara-blue , I have addressed all the comments & added a bonus as well, should rank Thank you |
📏 PR Size: 547 lines changed (Size L)Please note: this PR exceeds the 400 LOC soft limit.
|
you may ignore this :) |
yara-blue
left a comment
There was a problem hiding this comment.
Code is looking good, Unfortunately I found regression compared to the current ranking:
As fuzzy finding is a method of navigation for a large user base we must be sure not to regress there (they would get pretty annoyed).
We can still get this over the line though! I think what we need is to extend the test-suite for the file finder comparing the current fuzzy finder and this one. With the above (and the audio settings example) we have at least two test cases already. Maybe you can find a few more?
Let me know what you think.
sure let me add some more test cases |
|
added some more tests : ) & now those pointed above are addressed. |
|
I have fixed the edge cases , replaced single pattern matching ( |
yara-blue
left a comment
There was a problem hiding this comment.
Really elegant solution with the Atoms!
I'm gonna daily drive this for two days and see if I can find any other regression. If you could do that minor file_name refactor then we should be good.
Oh and see my note on indices. You can absolutely leave them as is however there are many more pickers to make fuzzy so it might help us in the future to have this code as readable as possible :)
|
is the test failure related to this PR? |
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
|
Hii @yara-blue are there any more changes required from my end, Also I have it rebased with main. |
Sorry its taking so long, I'm trying to find time to check why that test is failing, should find some this week! |
|
rebase fixed it! 🥳 Lets merge! |
|
Feel free to tackle other pickers if you want :) |
|
Thank you for merging this, I will start work on another picker. |
…industries#51164) Closes zed-industries#14428 Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing https://github.com/user-attachments/assets/7e0d67ff-cc4e-4609-880d-5c1794c64dcf - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Adds a new `fuzzy_nucleo` crate that implements order independent path matching using the `nucleo` library. currently integrated for file finder. --------- Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com> Signed-off-by: 11happy <soni5happy@gmail.com>
|
Hey @11happy, at @yara-blue suggestion I've been experimenting with using the I implemented a more plain string matching than the path specific setup you implemented here, and I noticed that it was quite a bit slower than It does seem like the main reason for this is that I was wondering if you had done any benchmarking of your own that showed different results? Or is it just a difference in functionality that I'm missing the nuance of. Totally possible that there is a piece I'm missing in my benchmark or other understanding of the topic. in the meantime i'm going to look into optimizing (I do understand that a lot of the performance hit, esp for the multi-word case is due to the atom thing, which I do understand the reasoning behind, I would just expect ~2x cost not ~10x) |
No :3, I kinda assumed that since Helix used it and Nucleo has benchmarks demonstrating its speed that we would be good. Thank you for helping out and comparing them!
Nucleo uses Smith-Waterman, which is really nice but more complex then the existing fuzzy implementation. So it makes sense for it to be a bit slower. Still 10x is a lot!
As long as the code stays readable optimizations are very welcome! Thank you and good luck! |
|
I saw the release notes and was compelled to post a HUGE THANK YOU!!! No matter how I tried, I could not rewire my muscle memory around this limitation compared to VSCode's search algo. THANK YOU THANK YOU THANK YOU!!!!!!! |
…industries#51164) Closes zed-industries#14428 Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing https://github.com/user-attachments/assets/7e0d67ff-cc4e-4609-880d-5c1794c64dcf - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Adds a new `fuzzy_nucleo` crate that implements order independent path matching using the `nucleo` library. currently integrated for file finder. --------- Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com> Signed-off-by: 11happy <soni5happy@gmail.com>







Closes #14428
Before you mark this PR as ready for review, make sure that you have:
screencast.mp4
Release Notes:
fuzzy_nucleocrate that implements order independent pathmatching using the
nucleolibrary. currently integrated for file finder.