Skip to content

outline: Switch the outline search to use fuzzy_nucleo - #56477

Merged
yara-blue merged 14 commits into
zed-industries:mainfrom
feitreim:feat-nucleo-outline
Jun 8, 2026
Merged

outline: Switch the outline search to use fuzzy_nucleo#56477
yara-blue merged 14 commits into
zed-industries:mainfrom
feitreim:feat-nucleo-outline

Conversation

@feitreim

Copy link
Copy Markdown
Collaborator

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:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • outline: switch to fuzzy_nucleo

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 11, 2026
@zed-community-bot zed-community-bot Bot added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label May 11, 2026
@maxdeviant maxdeviant changed the title outline: switch the outline search to use fuzzy_nucleo outline: Switch the outline search to use fuzzy_nucleo May 11, 2026
@zed-industries-bot

zed-industries-bot commented May 11, 2026

Copy link
Copy Markdown
Contributor
Messages
📖

This PR includes links to the following GitHub Issues: #55872
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against ea7e8b6

@ChristopherBiscardi ChristopherBiscardi added the area:search buffer search, project search, etc label May 12, 2026
@yara-blue yara-blue self-assigned this Jun 2, 2026
@yara-blue
yara-blue self-requested a review June 2, 2026 15:55
@feitreim
feitreim force-pushed the feat-nucleo-outline branch from ecf8664 to 7472a37 Compare June 2, 2026 16:29

@yara-blue yara-blue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

Comment thread crates/language/src/outline.rs
Comment thread crates/language/src/outline.rs Outdated
Comment thread crates/outline/src/outline.rs Outdated
Comment thread crates/language/src/outline.rs Outdated
@feitreim
feitreim requested a review from yara-blue June 5, 2026 20:42
@yara-blue
yara-blue enabled auto-merge June 8, 2026 14:07
@feitreim

feitreim commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

Okay so I fixed the typo and the unused dependency thing. but the clippy failure/test failure case

error[E0308]: mismatched types
   --> crates/language/src/outline.rs:319:19
    |
319 |             text: "completion".to_string(),
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^ expected `SharedString`, found `String`
    |
help: call `Into::into` on this expression to convert `std::string::String` into `gpui::SharedString`
    |
319 |             text: "completion".to_string().into(),
    |                                           +++++++

straight up does not exist. the line where I have something very similar happening, I already use .into(). so uh, hopefully that goes away?

@yara-blue

Copy link
Copy Markdown
Contributor

straight up does not exist. the line where I have something very similar happening, I already use .into(). so uh, hopefully that goes away?

we'll see :)

@yara-blue

Copy link
Copy Markdown
Contributor

yeah this is kinda crazy, lets see if I get this locally

auto-merge was automatically disabled June 8, 2026 14:15

Head branch was pushed to by a user without write access

@feitreim
feitreim force-pushed the feat-nucleo-outline branch from 7ccab7b to b9b6495 Compare June 8, 2026 14:15
@yara-blue
yara-blue enabled auto-merge June 8, 2026 14:17
@yara-blue
yara-blue added this pull request to the merge queue Jun 8, 2026
Merged via the queue into zed-industries:main with commit e40e7e8 Jun 8, 2026
32 checks passed
@feitreim
feitreim deleted the feat-nucleo-outline branch June 8, 2026 15:18
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…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
@yara-blue yara-blue removed their assignment Aug 3, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:search buffer search, project search, etc cla-signed The user has signed the Contributor License Agreement guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants