fix(nvim): make blink.cmp correctly complete command line

This commit is contained in:
Price Hiller 2024-12-22 17:17:54 -06:00
parent 8f354c69ea
commit 4403c8c140
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -50,7 +50,24 @@ return {
preset = "default", preset = "default",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" }, ["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide", "fallback" }, ["<C-e>"] = { "hide", "fallback" },
["<C-CR>"] = { "accept", "fallback" }, ["<CR>"] = {
function(cmp)
if vim.api.nvim_get_mode().mode:lower() == "c" then
return cmp.accept({
callback = function()
vim.api.nvim_feedkeys(
vim.api.nvim_replace_termcodes("<CR>", true, true, true),
"n",
true
)
end,
})
else
return cmp.accept()
end
end,
"fallback",
},
["<C-Tab>"] = { ["<C-Tab>"] = {
function(cmp) function(cmp)
if cmp.snippet_active() then if cmp.snippet_active() then