Try to fix luasnip jumps

This commit is contained in:
2024-02-11 22:03:26 +01:00
parent f5c9c94207
commit 84695b7700

23
lua/plugins/25-comp.lua Normal file
View File

@@ -0,0 +1,23 @@
---@type LazySpec
return {
{
"astronvim/astrocore",
opts = {
commands = {
LuaSnipExitOnModeChange = {
function(evt)
local ok, luasnip = pcall(require, "luasnip")
if
ok
and luasnip.session
and luasnip.session.current_nodes[evt.buf]
and not luasnip.session.jump_active
then
luasnip.unlink_current()
end
end,
},
},
},
},
}