Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort themes, language & files by score & then name #2675

Merged

Commits on Jun 4, 2022

  1. 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.
    michaeljones committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    6abef29 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. 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.
    michaeljones committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    764ad00 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary reference

    Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
    michaeljones and the-mikedavis authored Jun 6, 2022
    Configuration menu
    Copy the full SHA
    7df57dc View commit details
    Browse the repository at this point in the history