fix(blink): cmdline is now top-level on main branch

This commit is contained in:
Iordanis Petkakis 2025-02-15 21:59:25 +02:00
parent 4aff0063a4
commit fed8ac8915

View file

@ -79,7 +79,6 @@ return {
-- with blink.compat
compat = {},
default = { "lsp", "path", "snippets", "buffer" },
cmdline = {},
},
keymap = {
@ -89,6 +88,15 @@ return {
},
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
config = function(_, opts)
-- HACK: remove when next `blink.cmp` stable release is available
-- and just do `opts.cmdline.sources = {}` directly in `opts`
-- Should be greater than current 0.11.0
if not vim.g.lazyvim_blink_main then
opts.sources["cmdline"] = {}
else
opts.cmdline = opts.cmdline or {}
opts.cmdline.sources = {}
end
-- setup compat sources
local enabled = opts.sources.default
for _, source in ipairs(opts.sources.compat or {}) do