nvim(snip keymaps)
This commit is contained in:
parent
fd44615707
commit
a7d2f297b5
@ -1,7 +1,26 @@
|
|||||||
|
|
||||||
local status, _ = pcall(require, "luasnip")
|
local status, ls = pcall(require, "luasnip")
|
||||||
if (not status) then return end
|
if (not status) then return end
|
||||||
|
|
||||||
|
|
||||||
|
vim.g.snips_author = 'thek4n'
|
||||||
|
vim.g.snips_email = 'thek4n@yandex.com'
|
||||||
|
vim.g.snips_github = 'https://github.com/thek4n'
|
||||||
|
|
||||||
|
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
local function jump(val)
|
||||||
|
return function()
|
||||||
|
ls.jump(val)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
map({'i', 's'}, '<C-n>', jump(1))
|
||||||
|
map({'i', 's'}, '<C-p>', jump(-1))
|
||||||
|
|
||||||
|
|
||||||
local status_loader, luasnip_loaders = pcall(require, "luasnip.loaders.from_snipmate")
|
local status_loader, luasnip_loaders = pcall(require, "luasnip.loaders.from_snipmate")
|
||||||
if (not status_loader) then return end
|
if (not status_loader) then return end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user