From d894556c375c1c2398f170c21f9323c9c1eba9d4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 9 Oct 2023 09:51:53 +0200 Subject: [PATCH] feat(cmp): ctrl+CR will abort cmp and enter a new line --- lua/lazyvim/plugins/coding.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 511a3e7f..c6515802 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -66,6 +66,10 @@ return { behavior = cmp.ConfirmBehavior.Replace, select = true, }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + cmp.abort() + fallback() + end, }), sources = { { name = "nvim_lsp", group_index = 1 },