mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-25 18:28:50 +02:00
fix(luasnip): fixed luasnip keymaps
This commit is contained in:
parent
18756a614c
commit
05ec629d7b
1 changed files with 12 additions and 9 deletions
|
@ -13,15 +13,18 @@ return {
|
||||||
history = true,
|
history = true,
|
||||||
delete_check_events = "TextChanged",
|
delete_check_events = "TextChanged",
|
||||||
},
|
},
|
||||||
init = function()
|
-- stylua: ignore
|
||||||
local function jump(key, dir)
|
keys = {
|
||||||
vim.keymap.set({ "i", "s" }, key, function()
|
{
|
||||||
return require("luasnip").jump(dir) or key
|
"<tab>",
|
||||||
end, { expr = true })
|
function()
|
||||||
end
|
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
||||||
jump("<tab>", 1)
|
|
||||||
jump("<s-tab>", -1)
|
|
||||||
end,
|
end,
|
||||||
|
expr = true, remap = true, silent = true, mode = "i",
|
||||||
|
},
|
||||||
|
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||||
|
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- auto completion
|
-- auto completion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue