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

compare.score makes inscope_inherent_import useless #6

Open
zjp-CN opened this issue May 5, 2024 · 0 comments
Open

compare.score makes inscope_inherent_import useless #6

zjp-CN opened this issue May 5, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@zjp-CN
Copy link
Owner

zjp-CN commented May 5, 2024

current

Since the suggestion from #4 (comment)

local compare = require("cmp").config.compare

opts.sorting.comparators = {
    compare.exact,
    compare.score,
    comparators.inscope_inherent_import,
    comparators.sort_by_label_but_underscore_last,
}

when press . without any extra char, compare.score will override inscope_inherent_import, causing inscope_inherent_import useless.

There are conflicts when they are combined: in the snippet, kinds are sorted, and methods are sorted by names, not by inherent vs trait, so need to figure out how the interaction in them behaves and lower the priority of name sorting.

@zjp-CN zjp-CN added bug Something isn't working enhancement New feature or request labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant