Skip to content
Snippets Groups Projects
Commit d1224ac3 authored by codecraft's avatar codecraft :crocodile:
Browse files

small use of functions for better readability

parent 51e03de2
No related branches found
No related tags found
No related merge requests found
...@@ -16,24 +16,8 @@ cmp.setup({ ...@@ -16,24 +16,8 @@ cmp.setup({
behavior = cmp.ConfirmBehavior.Replace, behavior = cmp.ConfirmBehavior.Replace,
select = true, select = true,
}), }),
["<Tab>"] = cmp.mapping(function(fallback) ["<S-TAB>"] = cmp.mapping.select_prev_item(),
if cmp.visible() then ["<TAB>"] = cmp.mapping.select_next_item(),
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
}), }),
sources = { sources = {
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment