1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
local ls = require('luasnip')
require('luasnip-conf.c')
require('luasnip-conf.lua')
require('luasnip-conf.rust')
ls.config.set_config = {
history = true,
updateevents = 'TextChanged, TextChangedI',
enable_autosnippets = false,
}
vim.keymap.set({ 'i', 's' }, '<C-j>', function()
if ls.expand_or_jumpable() then
ls.expand_or_jump()
end
end, { noremap = true, silent = true })
vim.keymap.set({ 'i', 's' }, '<C-e>', function()
if ls.jumpable(-1) then
ls.jump(-1)
end
end, { noremap = true, silent = true })
vim.keymap.set({ 'i', 's' }, '<C-l>', function()
if ls.choice_active() then
ls.change_choice(1)
end
end, { noremap = true, silent = true })
|