aboutsummaryrefslogtreecommitdiff
path: root/helix-loader/build.rs
diff options
context:
space:
mode:
authorMichael Jones2022-07-01 09:33:52 +0000
committerGitHub2022-07-01 09:33:52 +0000
commitd8abd1eaf398f462122efbc937cda9d8178a5754 (patch)
treef871faff20aa42b7a1896887f79ca8b528d5ca1e /helix-loader/build.rs
parentf10b6f6ee2bbf4d6d9356e27be25b25bdb85b9cd (diff)
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>
Diffstat (limited to 'helix-loader/build.rs')
0 files changed, 0 insertions, 0 deletions