Fix jump behaviour
This commit is contained in:
parent
90087512e4
commit
b034d461bc
@ -66,7 +66,7 @@ return {
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
-- Mapping for jumping in snippets)
|
||||
-- Mapping for jumping in snippets
|
||||
["<C-p>"] = cmp.mapping(function(fallback)
|
||||
if require("luasnip").jumpable() then
|
||||
-- Jump backwards if inside a snippet
|
||||
@ -75,6 +75,17 @@ return {
|
||||
-- Otherwise, fallback (insert a tab character)
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
-- Mapping for jumping backwards in snippets
|
||||
["<C-S-p>"] = cmp.mapping(function(fallback)
|
||||
if require("luasnip").jumpable() then
|
||||
-- Jump backwards if inside a snippet
|
||||
require("luasnip").jump()
|
||||
else
|
||||
-- Otherwise, fallback (insert a tab character)
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" })
|
||||
}),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user