diff options
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/lua/plugins.lua | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index c15d6fb..d3c9646 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -500,8 +500,8 @@ require('packer').startup({function() ['<c-n>'] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() + elseif luasnip.jumpable(1) then + luasnip.jump(1) else fallback() end @@ -543,9 +543,20 @@ require('packer').startup({function() end, }), ['<s-tab>'] = cmp.mapping({ + i = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, s = function(fallback) if cmp.visible() then cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) else fallback() end @@ -573,6 +584,8 @@ require('packer').startup({function() fallback() end end, { 'i', 's'}), + ['<s-pagedown>'] = cmp.mapping.scroll_docs(-4), + ['<s-pageup>'] = cmp.mapping.scroll_docs(4), }, snippet = { expand = function(args) |