🐛 Bug(blink.cmp): fix breaking change in cmdline configuration

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
This commit is contained in:
2025-02-15 21:31:22 -05:00
parent a9e51f8793
commit 5701043c61
+9 -8
View File
@@ -62,8 +62,14 @@ if vim.g.useblinkcmp then
snippets = {
preset = 'luasnip',
},
sources = {
cmdline = function()
keymap = {
preset = 'enter',
['<C-y>'] = { 'select_and_accept' },
['<CR>'] = { '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',
['<C-y>'] = { 'select_and_accept' },
['<CR>'] = { 'fallback' },
cmdline = {
keymap = {
preset = 'enter',
['<C-y>'] = { 'select_and_accept' },
['<S-Tab>'] = { 'select_prev', 'fallback' },