outline: Switch the outline search to use fuzzy_nucleo - #56477
Conversation
ecf8664 to
7472a37
Compare
yara-blue
left a comment
There was a problem hiding this comment.
I was out for a week and it has taken a bit to catch up with everything, apologies.
I really appreciate you putting all this effort into fuzzy search!!
Now on to the review, I'm struggling a little in fully understanding all the needed changes. I've left some comments explaining my confusion, do you see a way to rework this (renames/comments) to make it easier to read? I'm not saying it is bad code! I'm saying search is hard, especially when trees get involved :)
|
Okay so I fixed the typo and the unused dependency thing. but the clippy failure/test failure case straight up does not exist. the line where I have something very similar happening, I already use |
we'll see :) |
|
yeah this is kinda crazy, lets see if I get this locally |
Head branch was pushed to by a user without write access
7ccab7b to
b9b6495
Compare
…s#56477) Nucleo tracking issue: zed-industries#55872 This PR switches the outline picker to use `fuzzy_nucleo`. with that I refactored the outline fuzzy picking to take advantage of nucleo and its multi-atom query support. The previous implementation had a lot going on specifically to work around the lack of multiple atoms, basically taking matters into its own hands to accomplish the same goals within the constraints it had. Instead of having two lists of candidates that we have to run the query against, we just run a single query and take advantage of the fact that nucleo chooses the matches that are the furtherest towards the end of the haystack to implement the same ancestor/leaf filtering. It retains the leaf only matching on single atom queries. video: https://github.com/user-attachments/assets/64baa8d7-fd77-452c-86d1-e08561422d85 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - outline: switch to fuzzy_nucleo
…s#56477) Nucleo tracking issue: zed-industries#55872 This PR switches the outline picker to use `fuzzy_nucleo`. with that I refactored the outline fuzzy picking to take advantage of nucleo and its multi-atom query support. The previous implementation had a lot going on specifically to work around the lack of multiple atoms, basically taking matters into its own hands to accomplish the same goals within the constraints it had. Instead of having two lists of candidates that we have to run the query against, we just run a single query and take advantage of the fact that nucleo chooses the matches that are the furtherest towards the end of the haystack to implement the same ancestor/leaf filtering. It retains the leaf only matching on single atom queries. video: https://github.com/user-attachments/assets/64baa8d7-fd77-452c-86d1-e08561422d85 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - outline: switch to fuzzy_nucleo
Nucleo tracking issue: #55872
This PR switches the outline picker to use
fuzzy_nucleo.with that I refactored the outline fuzzy picking to take advantage of nucleo and its multi-atom query support. The previous implementation had a lot going on specifically to work around the lack of multiple atoms, basically taking matters into its own hands to accomplish the same goals within the constraints it had.
Instead of having two lists of candidates that we have to run the query against, we just run a single query and take advantage of the fact that nucleo chooses the matches that are the furtherest towards the end of the haystack to implement the same ancestor/leaf filtering. It retains the leaf only matching on single atom queries.
video:
Screen.Recording.2026-05-11.at.4.50.19.PM.mov
Self-Review Checklist:
Release Notes: