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

can't toggle the recently suggestion #744

Closed
asaning opened this issue May 16, 2023 · 4 comments · Fixed by #746
Closed

can't toggle the recently suggestion #744

asaning opened this issue May 16, 2023 · 4 comments · Fixed by #746
Labels
cmp Nvim-cmp related issues enhancement New feature or request usage User-specific issues

Comments

@asaning
Copy link

asaning commented May 16, 2023

Feature description

please see the below picture.

1, the first time i write the match keyword and then select the snippet style
2, the second time i write the match keyword, the snippet style isn't the first one in the waiting suggestion list

by the way, the order of the suggestion seems sort by name exactly, how can i fix it.

image

Additional information

No response

@asaning asaning added the enhancement New feature or request label May 16, 2023
@Jint-lzxy
Copy link
Collaborator

by the way, the order of the suggestion seems sort by name exactly

Hmm not really:

sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,
require("copilot_cmp.comparators").score,
-- require("cmp_tabnine.compare"),
compare.offset,
compare.exact,
compare.lsp_scores,
require("cmp-under-comparator").under,
compare.kind,
compare.sort_text,
compare.length,
compare.order,
},
},

In fact your issue is not related to this configuration - just b/c cmp will not cache your previous selections. Of course, you can always write custom comparators to achieve this.

@Jint-lzxy Jint-lzxy added usage User-specific issues cmp Nvim-cmp related issues invalid:misc Config independent issue and removed enhancement New feature or request labels May 16, 2023
@ayamir
Copy link
Owner

ayamir commented May 16, 2023

the order of the suggestion seems sort by name exactly, how can i fix it.

comment this line:

@ayamir
Copy link
Owner

ayamir commented May 16, 2023

@Jint-lzxy
Copy link
Collaborator

Yep I'm adjusting this list based upon the recently merged folke's PR 😄 FWIW the default isn't arranged in the best possible way - sometimes less commonly used entries might even precede LSP suggestions.

@ayamir ayamir added enhancement New feature or request and removed invalid:misc Config independent issue labels May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp Nvim-cmp related issues enhancement New feature or request usage User-specific issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants