refine luasnip binds

This commit is contained in:
2024-11-19 13:24:25 -06:00
parent f489429d48
commit c727e80e39

View File

@ -28,15 +28,27 @@ return { 'L3MON4D3/LuaSnip',
},
}
map({"i", "s"}, { "<C-e>", "<C-a>" }, function()
map({"i", "s"}, "<c-a>", function()
if luasnip.choice_active() then
luasnip.change_choice(1)
end
end)
map({"i", "s"}, "<c-e>", function()
if luasnip.expandable() then
luasnip.expand()
end
end)
map({"i", "s"}, "<C-j>", function()
if luasnip.jumpable(1) then
luasnip.jump(1)
end
end)
map({"i", "s"}, "<C-k>", function()
if luasnip.expandable(-1) then
luasnip.expand(-1)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
end
end)