# fuzzy_nucleo: Refactor multi-atom code to use nucleo::Pattern \(\#55264\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7b5b0e4e9549c041406bae41a41bfb6b44ba568c

Requested commit: 7b5b0e4e9549c041406bae41a41bfb6b44ba568c

Commit: 7b5b0e4e9549c041406bae41a41bfb6b44ba568c

Tree: fde6565eb5c8a440f5b422a8cc4af37e05770acb

Author: Finn Eitreim

Committer: GitHub

## Message

```
fuzzy_nucleo: Refactor multi-atom code to use nucleo::Pattern (#55264)

refactor of the fuzzy_nucleo string and path matching code, instead of
handling the multiple atoms ourselves we can just use `nucleo::Pattern`
and abstract that all away. this replaces the for loop in the
path/string_match_helper functions. all functionality is exactly the
same. basically the same / within some tiny margin of the original.

this could enable the use of `nucleo::Pattern::parse` in the future if
that was wanted, which allows some extra syntax to activate different
matching modes. [more info from
deepwiki](https://deepwiki.com/search/how-do-the-different-atom-matc_37e510de-af27-44a1-a52f-3fc367462e6e?mode=fast).
I'm pretty sure that enabling that is as simple as switching a
`Pattern::new(...)` call with `Pattern::parse(...)`.

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:

- N/A
```

## Parents

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

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