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 c4de0c1d34
commit b2a18f8e0e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
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