benlubas / cmp2lsp

use nvim-cmp sources as if they were native LSP sources (mostly)
35 stars 1 forks source link

LSP completion stops working #2

Closed Bleksak closed 2 weeks ago

Bleksak commented 2 weeks ago

My neovim config: https://github.com/Bleksak/neovim

When I call .setup() then all of my lsps stop completing, I tracked this issue down to cmp2lsp/init.lua:65 If I remove completionProvider, from this plugin, the autocompletion starts working again.

At the same time, the completions from registered sources work as intended, except for one - supermaven, where it complains about copying some userdata

I'm setting this up in my init.lua file, I tried both vim.schedule and just calling .setup(), neither have worked for me.

benlubas commented 2 weeks ago

Removing completionProvider stops all auto completion from coming from this plugin.

I do notice that normal completions are being interrupted though, I'm going to spend some time playing around with it. My suspicion is that this LSP is overriding others and only one LSP per buffer is being asked for completions at a time

benlubas commented 2 weeks ago

I fixed some issues, and now I more consistently get completions from lsp sources, but I'm missing a few cmp sources sometimes.

I get consistent completion from neorg for example, but not from cmp-calc.

I unfortunately don't have a great way to use supermaven. Could open a separate issue with more details on the error that it gives you?

I'm going to keep this one open for now as well, because there are still some issues.

benlubas commented 2 weeks ago

I made a few more changes. Let me know if you're still having issue with sources not showing up. And also checkout the config file, there's a new way to configure sources a little better.

Unfortunately no way to assign sorting order without blowing up the scope of this plugin, so best to just give some sources absolute priority over others.