mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
feat: Playing around with lazy-nvim and reworking my nvim config
This commit is contained in:
39
nvim/lazynvim/lua/plugins/luasnip.lua
Normal file
39
nvim/lazynvim/lua/plugins/luasnip.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
opts = function()
|
||||
LazyVim.cmp.actions.snippet_forward = function()
|
||||
if require("luasnip").jumpable(1) then
|
||||
require("luasnip").jump(1)
|
||||
return true
|
||||
end
|
||||
end
|
||||
LazyVim.cmp.actions.snippet_stop = function()
|
||||
if require("luasnip").expand_or_jumpable() then -- or just jumpable(1) is fine?
|
||||
require("luasnip").unlink_current()
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<C-k>",
|
||||
mode = { "i", "s" },
|
||||
function()
|
||||
if ls.expand_or_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
"<C-j>",
|
||||
mode = { "i", "s" },
|
||||
function()
|
||||
if ls.jumpable(-1) then
|
||||
ls.jump(-1)
|
||||
end
|
||||
end
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user