LuaSnip
LuaSnip copied to clipboard
Autosnippet Error Cmp Buffer
I have recently come across an issue at the interface between LuaSnip and Cmp
Plugins:
use "hrsh7th/nvim-cmp"
use "hrsh7th/cmp-buffer"
use "saadparwaiz1/cmp_luasnip"
use({"L3MON4D3/LuaSnip"})
Snippet:
s({trig="bf", dscr="\textbf{}"},
{
t("\\textbf{"),
i(1),
t("}"),
}
),
cmp setting:
cmp.setup {
[...]
sources = {
[...]
{name = "buffer" }
},
}
If buffer is enabled the above snippet first expands to \textbf{} and from then onwards to bf}{}.
If buffer is disabled the snippet always expands to \textbf{}.
Maybe this issue should be raised with cmp instead. Any ideas on what the problem might be?
Oh yikes, that sounds horrible. I think it would be best to first get some idea why there even is a second change, seems like your best bet for that is indeed opening an issue in cmp. We had similar issues when extmarks were moved around, but those mostly materialized when a functionNode is in the snippet, which isn't the case here.. So no, I don't have a good idea on what is going wrong :/
I think I'm running in the same issue