diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 94944b7..02b77e9 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -37,7 +37,7 @@ local default = { behavior = cmp.ConfirmBehavior.Replace, select = true, }, - ["<Tab>"] = function(fallback) + ["<Tab>"] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif require("luasnip").expand_or_jumpable() then @@ -45,8 +45,8 @@ local default = { else fallback() end - end, - ["<S-Tab>"] = function(fallback) + end, { "i", "s" }), + ["<S-Tab>"] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() elseif require("luasnip").jumpable(-1) then @@ -54,7 +54,7 @@ local default = { else fallback() end - end, + end, { "i", "s" }), }, sources = { { name = "nvim_lsp" },