fix(nvim): Disable codeium auto-completions when codeium fails to

install

- Codeium installs a pre-compiled "server" binary - incompatible with
  FreeBSD. So, this fix would disable codeium auto-completions when it
  could not install the binary
This commit is contained in:
Pratik Tripathy
2025-01-06 17:16:35 +05:30
parent 5532a33478
commit 976e935039
2 changed files with 20 additions and 9 deletions

View File

@@ -7,11 +7,28 @@ return {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
{ {
"saghen/blink.compat", "saghen/blink.compat",
opts = { opts = function()
-- Do NOT use if codeium is not loaded
local codeium_loaded, _ = pcall(require, "codeium")
if not codeium_loaded then
return {}
end
return {
enable_events = true, enable_events = true,
sources = {
providers = {
codeium = {
name = "codeium",
module = "blink.compat.source",
score_offset = 1200,
async = true,
}, },
}, },
}, },
}
end,
},
},
cmd = "Codeium", cmd = "Codeium",
build = ":Codeium Auth", build = ":Codeium Auth",
event = "InsertEnter", event = "InsertEnter",

View File

@@ -105,7 +105,6 @@ return {
"snippets", "snippets",
"luasnip", "luasnip",
"path", "path",
"codeium",
"markdown", "markdown",
}, },
cmdline = {}, cmdline = {},
@@ -131,11 +130,6 @@ return {
path = { path = {
score_offset = 750, score_offset = 750,
}, },
codeium = {
name = "codeium",
module = "blink.compat.source",
score_offset = 1200,
},
markdown = { markdown = {
name = "RenderMarkdown", name = "RenderMarkdown",
module = "render-markdown.integ.blink", module = "render-markdown.integ.blink",