feat(ai): better completion/suggestions of AI engines

This commit is contained in:
Folke Lemaitre 2024-11-10 13:35:42 +01:00
parent 86904d2fb1
commit b2e012cb83
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 110 additions and 37 deletions

View file

@ -7,7 +7,7 @@ function M.cmp_source(name, icon)
if not package.loaded["cmp"] then
return
end
for _, s in ipairs(require("cmp").core.sources) do
for _, s in ipairs(require("cmp").core.sources or {}) do
if s.name == name then
if s.source:is_available() then
started = true