From efeb9b5f9f6aac86332c4c4ec646720f9c500a48 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 20 Jan 2023 10:07:25 -0700 Subject: Change confirm mapping to rather than I find it more intuitive and I'm less liable to hit tab while typing than enter anyway. --- lua/lsp.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/lsp.lua b/lua/lsp.lua index 3e01073..c443788 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -60,7 +60,6 @@ cmp.setup({ [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.close(), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -78,7 +77,7 @@ cmp.setup({ [""] = cmp.mapping(function(fallback) if cmp.visible() then - cmp.mapping.confirm({ select = true }) + cmp.mapping.confirm({ select = true })() elseif vim.fn["vsnip#available"](1) == 1 then feedkey("(vsnip-expand-or-jump)", "") elseif has_words_before() then -- cgit