From 96f614f8370a091d6dd3190c3600293748d4a5c4 Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Fri, 24 Dec 2021 15:57:12 -0500 Subject: [PATCH] Clean up cmp bindings, add tab bind --- lua/plugins.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/plugins.lua b/lua/plugins.lua index a03dade..344d4a1 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -11,15 +11,15 @@ require("filetype").setup { cmp.setup({ mapping = { - [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), - [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), - [''] = cmp.config.disable, - [''] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), [''] = cmp.mapping.confirm({ select = true }), + [''] = function(fallback) + if cmp.visible() then + cmp.select_next_item() + else + fallback() + end + end }, sources = cmp.config.sources({ { name = 'nvim_lsp' },