# outline: Switch the outline search to use fuzzy_nucleo \(\#56477\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e40e7e8b058d69e33efabe014666cf1678907ee6)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e40e7e8b058d69e33efabe014666cf1678907ee6

Requested commit: e40e7e8b058d69e33efabe014666cf1678907ee6

Commit: e40e7e8b058d69e33efabe014666cf1678907ee6

Tree: 4ba48b3707a4041cf12a3a4c77433e22c98e425d

Author: Finn Eitreim

Committer: GitHub

## Message

```
outline: Switch the outline search to use fuzzy_nucleo (#56477)

Nucleo tracking issue:
https://github.com/zed-industries/zed/issues/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
```

## Parents

- [2ee00ba00494b7575c15e6d567ab9e958763f97f](https://git.cafe/gitcafe/zed/commit/2ee00ba00494b7575c15e6d567ab9e958763f97f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e40e7e8b058d69e33efabe014666cf1678907ee6?format=markdown)
