You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-term
Michael Jones d8abd1eaf3
Sort themes, language & files by score & then name (#2675)
* Sort themes by score & then name

Previously the themes were appearing unordered after typing ':theme '.
This sorts them first by fuzzy score and then by name so that they
generally appear in a more ordered fashion in the initial list.

The sort by name does not really pay off when there is a score so an
alternative approach would be to sort by name if there is string to
fuzzy match against and otherwise sort by score.

I've lowercased the names as that avoids lower case & upper case letters
being sorted into separate groups. There might be a preferable approach
to that though.

* Sort language & files by score then name

And change to use sort_unstable_by instead of sort_unstable_by_key as it
allows us to avoid some allocations.

I don't fully understand the flow of the 'filename_impl' function but
this seems to deliver the desired results.

* Remove unnecessary reference

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
..
src Sort themes, language & files by score & then name (#2675) 2 years ago
tests replace phrase in tests 2 years ago
.gitignore Initial import. 5 years ago
Cargo.toml build(deps): bump indoc from 1.0.3 to 1.0.6 (#2898) 2 years ago
build.rs publish a source tarball with version and grammars (#1875) 3 years ago