mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
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:
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user