ZIm/crates/editor
Smit Barmase cf13a76618
editor: Prioritize fuzzy score over sort positions in code completion sort (#35229)
We already prioritize matches that come after separators like `_`: 


cef7d53607/crates/fuzzy/src/matcher.rs (L274)

and deprioritize non-consecutive matches using distance penalty:


cef7d53607/crates/fuzzy/src/matcher.rs (L281)

In completion sort, letting fuzzy score be the primary sort factor and
sort positions be secondary yields better results upon testing. We still
need sort positions because of this kind of test case:


cef7d53607/crates/editor/src/code_completion_tests.rs (L195-L217)

Before/After:

<img height="250" alt="image"
src="https://github.com/user-attachments/assets/38495576-add6-4435-93f0-891f48ec9263"
/>
<img height="250" alt="image"
src="https://github.com/user-attachments/assets/0c73b835-0e23-4e30-a3ff-28bb56294239"
/>


Release Notes:

- N/A
2025-07-29 01:15:29 +05:30
..
src editor: Prioritize fuzzy score over sort positions in code completion sort (#35229) 2025-07-29 01:15:29 +05:30
Cargo.toml languages: Fix Bash indentation issues with multi-cursors, newlines, and keyword outdenting (#35116) 2025-07-26 04:58:10 +05:30
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00