LuaSnip icon indicating copy to clipboard operation
LuaSnip copied to clipboard

Weird expansion bug with `cmp`, that repeats trigger at first insert point :thinking:

Open bew opened this issue 2 years ago • 3 comments

I'm not sure which plugin is doing this behavior exactly

Using the following snippet:

snip("do", {desc = "do ... end"}, U.myfmt {
  [[
    do
      <body>
    end
  ]],
  { body = i(0) },
})

Peek 2023-09-28 00-12

Here I try to use the snippet 4 times:

  1. with no text before, direct expansion via ls.expand() ok
  2. with no text before, with expansion through cmp (select then <C-y>) ok
  3. with text before, direct expansion via ls.expand() BUG
  4. with text before, with expansion through cmp (select then <C-y>) ok

I'm using cmp with cmp_luasnip of course

bew avatar Sep 27 '23 22:09 bew

Can't reproduce this one either :/

https://github.com/L3MON4D3/LuaSnip/assets/41961280/4089c07e-06eb-41bc-864f-938d9cf96cb8

L3MON4D3 avatar Sep 28 '23 06:09 L3MON4D3

Yeah that's what I thought, I'll try to repro with a minimal config later, probably this weekend.

bew avatar Sep 28 '23 06:09 bew

It might be because I'm still using cmp's native menu.

Here is a reproduction script: https://gist.github.com/bew/76f2d512ec42136f61b3802335a7b620 Peek 2023-10-08 07-08

bew avatar Oct 08 '23 05:10 bew