feat(cmp)!: moved nvim-cmp to extras and prefer blink.cmp on Neovim >= 0.10 as default completion engine

This commit is contained in:
Folke Lemaitre 2024-12-12 07:22:24 +01:00
parent d904a1ef47
commit 2cbfb9b6b7
6 changed files with 147 additions and 113 deletions

View file

@ -265,4 +265,13 @@ function M.memoize(fn)
end
end
---@return "nvim-cmp" | "blink.cmp"
function M.cmp_engine()
vim.g.lazyvim_cmp = vim.g.lazyvim_cmp or "auto"
if vim.g.lazyvim_cmp == "auto" then
return LazyVim.has_extra("nvim-cmp") and "nvim-cmp" or "blink.cmp"
end
return vim.g.lazyvim_cmp
end
return M