From aacbf5fb99243e81ed1ac988e705d370c1f18811 Mon Sep 17 00:00:00 2001 From: rootiest Date: Thu, 27 Feb 2025 16:51:04 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Bug(blink.cmp):=20tweak=20the=20?= =?UTF-8?q?cmdline=20completion=20behavior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows enter to send the command even if there is a suggestion to select. Avoids needing to press enter twice. --- lua/plugins/cmp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 724d6ba..ebbcb6d 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -69,6 +69,7 @@ if vim.g.useblinkcmp then }, cmdline = { enabled = true, + completion = { menu = { auto_show = true } }, sources = function() local type = vim.fn.getcmdtype() -- Search forward and backward @@ -86,6 +87,7 @@ if vim.g.useblinkcmp then [''] = { 'select_and_accept' }, [''] = { 'select_prev', 'fallback' }, [''] = { 'select_next', 'fallback' }, + [''] = { 'accept_and_enter', 'fallback' }, }, }, },