From 84695b770053a3e5adbcb86dae4b4a377e24695b Mon Sep 17 00:00:00 2001 From: Niverton Date: Sun, 11 Feb 2024 22:03:26 +0100 Subject: [PATCH] Try to fix luasnip jumps --- lua/plugins/25-comp.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/plugins/25-comp.lua diff --git a/lua/plugins/25-comp.lua b/lua/plugins/25-comp.lua new file mode 100644 index 0000000..3744256 --- /dev/null +++ b/lua/plugins/25-comp.lua @@ -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, + }, + }, + }, + }, +}