zbirenbaum / copilot-cmp

Lua plugin to turn github copilot into a cmp source
MIT License
1.07k stars 38 forks source link

lsp suggestions often don't show up when copilot suggestions are present #99

Open JosefLitos opened 7 months ago

JosefLitos commented 7 months ago

no matter the comparators I set, the nvimlsp source gets often (not always) hidden when copilot suggestions "arrive"_: image but then: image

while I'm writing copilot doesn't show anything, so lsp shows just fine, but when I stop, it mostly hides all suggestions from other sources.

my source list:

local src = {
    { name = 'copilot', group_index = 2, keyword_length = 0, priority = 0 },
    { name = 'nvim_lsp', group_index = 2 },
}
-- cmp comparators used:
    cmp.config.compare.score,
    -- cmp.config.compare.offset,
    cmp.config.compare.recently_used,
    cmp.config.compare.scopes,
    cmp.config.compare.kind,

As you can see, I tried setting the priority to 0, but to no avail.

dgopsq commented 3 months ago

I think I'm having this issue too and I'm using LazyVim. Is there a way to fix it somehow?

kackerx commented 3 months ago

Same problem, want to know the solution

JosefLitos commented 2 months ago

When I played with my settings a bit, I managed to reproduce it again, but then it disappeared again, so idk. There are some other issues, though, which for the lack of activity here I've tried to solve myself (emoty line suggestions). You can try my fork and see if these issues go away (I assume not so, but its the best I can offer).

Edit: I believe cmp has some issues with keyword_length=0, so that may be it.