local cmp = require "cmp" local luasnip = require "luasnip" return { completion = { completeopt = "menu,menuone,noinsert", }, window = { documentation = { max_width = 40, }, }, mapping = { [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Select }, [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Select }, [""] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Select }, [""] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Select }, [""] = cmp.mapping(function(fallback) if luasnip.jumpable(1) then luasnip.jump(1) else fallback() end end, { "i", "s" }), [""] = cmp.mapping(function(fallback) if luasnip.jumpable(-1) then luasnip.jump(-1) else fallback() end end, { "i", "s" }), }, }