Closed Xunius closed 2 years ago
Hey,
I assume you have an UltiSnips snippet for class
? Does that snippet work when you type class
and hit <Tab>
manually?
If you see the same entry multiple times, it means that cmp.config.sources
has been called more than once or the same source was added twice. This can happen if you source the same Lua file repeatedly.
Can you check if LSP snippets work by typing function
in a .lua file and see if sumneko-lua suggests you the function snippet? Make sure to install that language server.
@smjonas Many thanks for taking the effort to reply.
I actually wanted to close this issue earlier today but I guess my internet was too bad it didn't commit. I'm very new to neovim and configuring using lua so I've been creating a bit mess. It turns out that I had duplicate language servers running in the background, and I think that's the reason for those duplicated entries, and it also caused complete freezes of nvim.
I somehow managed to get it work, but I don't really know now (sigh), that's why I'd like to close this (or even better, delete it).
No worries at all, thanks for your update on the issue!
Hi all,
I'm migrating from my old vim+Ultisnips+supertab to the newer neovim+Ultisnips+nvim-cmp config. I've spent hours and still can't get snippets to work. Please help!
Expected behavior:
Open a
.py
file, type some keyword, e.g.class
, then a completion list would appear listing aclass
snippet entry.Actual behavior:
The completion list shows only these:
(Why the same thing repeats 3 times, btw?)
My specs:
nvim --version
:How to reproduce
Below is my
init.vim
: