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

Latest commit breaks completion if there are duplicates #157

Closed
E-ricus opened this issue Sep 6, 2021 · 7 comments
Closed

Latest commit breaks completion if there are duplicates #157

E-ricus opened this issue Sep 6, 2021 · 7 comments

Comments

@E-ricus
Copy link
Contributor

E-ricus commented Sep 6, 2021

So with the latest commit there is a problem if in the completion list is present a repeated element, as it is not being displayed, but I asumme it is still being indexed causing to expand information not corresponding to the selected item.

Here is an example with gopls and using friendly-snippets, the func completion is a keyword for the language server and also is as snippet, and as it is not repeted on the list, the next snippets are expanding the previous one:

simplescreenrecorder-2021-09-05_19.42.44.mov

This is not happening on the previous commit, here is the correct behavior using the previous commit:

simplescreenrecorder-2021-09-05_19.40.02.mov
@hrsh7th
Copy link
Owner

hrsh7th commented Sep 6, 2021

Thank you. I've fixed.

@hrsh7th hrsh7th closed this as completed Sep 6, 2021
@xeluxee
Copy link

xeluxee commented Sep 15, 2021

This issue is still present, I'm using 1cd5774.
Now there are duplicates but not enough entries are shown.

cmp0

A for snippet from luasnip source (Snippet) is missing in above screenshot, while forr and foreach are shown even if they are provided by the same source (luasnip).

@hrsh7th
Copy link
Owner

hrsh7th commented Sep 16, 2021

I can't reproduce. What is the missing candidate?

@xeluxee
Copy link

xeluxee commented Sep 16, 2021

A for is missing from popupmenu, a for that should be provided by LuaSnip source that is active (as you can see from forr and foreach snippets).
Only two for are shown, the one provided by LuaSnip is missing.

To reproduce:

  1. install friendly-snippets, nvim-cmp and LSP and LuaSnip sources.
  2. Create a cpp file
  3. type for
  4. You should see something similar to the screenshot above
  5. A for entry is missing

Update: if you disable LSP source, for entry from luasnip becomes visible.

@hrsh7th
Copy link
Owner

hrsh7th commented Sep 16, 2021

@xeluxee I've tested it with luasnip and vsnip both (I'm tired)
The cmp_luasnip does not show for snippet but cmp-vsnip shows it.

@xeluxee
Copy link

xeluxee commented Sep 16, 2021

Ok @hrsh7th, so you think this issue is related to cmp_luasnip and not to nvim-cmp?
I think this could be linked to nvim-cmp some way because when I disable LSP source for snippet from LuaSnip source becomes visible...
There is a kind of conflict between sources

@hrsh7th
Copy link
Owner

hrsh7th commented Sep 16, 2021

It's definitely source related.

Kapture.2021-09-17.at.01.03.51.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants