hrsh7th / cmp-vsnip

nvim-cmp source for vim-vsnip
MIT License
92 stars 5 forks source link

No snippets shown in nvim-cmp #5

Open GuillaumeAllain opened 1 year ago

GuillaumeAllain commented 1 year ago

Hi,

Having updated my config today, I've seen that I get no snippets shown in nvim-cmp. I saw that commit 18ff44cd4fa873d8c2aa23cb26cdd68e326f9e9c seems to have broken my config. However, replacing the line in:

https://github.com/hrsh7th/cmp-vsnip/blob/989a8a73c44e926199bfd05fa7a516d51f2d2752/lua/cmp_vsnip/init.lua#L18

by the same line in the previous commit:

https://github.com/hrsh7th/cmp-vsnip/blob/1ae05c6c867d9ad44bce811056e861e0d5c531cb/lua/cmp_vsnip/init.lua#L14

seems to have solved the issue. Do you have any idea why that should be and if a fallback to the old line is necessary?

Thanks

Jeppelelle commented 1 year ago

My vsnip completion have not been working for over a week now & that line back to the old one did not work for me

I have not changed anything and i am running nvim 0.9.0, i tried the release build which is 0.8.1 and cmp-vsnip seems to be broken there to

I have not changed anything in my config, snippets are a great tool that increase my workflow significantly so i would really appreciate any suggestions

GuillaumeAllain commented 1 year ago

My vsnip completion have not been working for over a week now & that line back to the old one did not work for me

I have not changed anything and i am running nvim 0.9.0, i tried the release build which is 0.8.1 and cmp-vsnip seems to be broken there

I am also running the latest build, however Vsnip works for me. Your issue might be separate and would need to open an issue on the vsnip repo itself.

sQVe commented 1 year ago

I'm having this issue too. vsnip is working fine but no suggestions is being provided by cmp-vsnip.

The following setup works fine, which essentially reverts the keyword_pattern changed in https://github.com/hrsh7th/cmp-vsnip/commit/18ff44cd4fa873d8c2aa23cb26cdd68e326f9e9c.

{
  name = 'vsnip',
  keyword_pattern = '\\%([^[:alnum:][:blank:]]\\|\\w\\+\\)',
}
bluz71 commented 1 year ago

Correct, 18ff44c broke vsnip completions in nvim-cmp.

I have switched over to lazy.nvim as my plugin manager, I simply lock cmp-vsnip to the commit before the bad one as follows:

  {
    "hrsh7th/nvim-cmp",
    tag = "v0.0.1",
    dependencies = {
      "hrsh7th/cmp-buffer",
      "hrsh7th/cmp-nvim-lsp",
      { "hrsh7th/cmp-vsnip", commit = "1ae05c6" },
    },
    event = "InsertEnter",
    config = function()
      require("configs.cmp")
    end,
  },

That works well enough until a fix is incorporated here.

seb-mueller commented 1 year ago

Same here, this line using vim-plug fixed it for me:

Plug 'hrsh7th/cmp-vsnip', { 'commit': '1ae05c6c867d9ad44bce811056e861e0d5c531cb' }
0rtz commented 1 year ago

Using commit 1ae05c6c867d9ad44bce811056e861e0d5c531cb as mentioned by @seb-mueller solves https://github.com/hrsh7th/nvim-cmp/issues/1404 for me

doronbehar commented 1 year ago

I experience this as well, and all the mentioned fixes this for me. Any news on that @hrsh7th ?