From 5701043c6120ade6bf7259ccf6d0f8e44fdbaa39 Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 15 Feb 2025 21:31:22 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Bug(blink.cmp):=20fix=20breaking?= =?UTF-8?q?=20change=20in=20cmdline=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blink.cmp now configures cmdline sources and keymaps in their own top-level cmdline table, previously they were mixed in with the default keymaps and sources tables. BREAKING CHANGE: Change to how cmdline is configured in blink.cmp --- lua/plugins/cmp.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index e22f559..724d6ba 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -62,8 +62,14 @@ if vim.g.useblinkcmp then snippets = { preset = 'luasnip', }, - sources = { - cmdline = function() + keymap = { + preset = 'enter', + [''] = { 'select_and_accept' }, + [''] = { 'fallback' }, + }, + cmdline = { + enabled = true, + sources = function() local type = vim.fn.getcmdtype() -- Search forward and backward if type == '/' or type == '?' then @@ -75,12 +81,7 @@ if vim.g.useblinkcmp then end return {} end, - }, - keymap = { - preset = 'enter', - [''] = { 'select_and_accept' }, - [''] = { 'fallback' }, - cmdline = { + keymap = { preset = 'enter', [''] = { 'select_and_accept' }, [''] = { 'select_prev', 'fallback' },