Codeium
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Alternatively, you can add it to your lazy.nvim
imports
lua/config/lazy.lua
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.ai.codeium" },
{ import = "plugins" },
},
})
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
codeium.nvim
codeium
- Options
- Full Spec
opts = {
enable_cmp_source = vim.g.ai_cmp,
virtual_text = {
enabled = not vim.g.ai_cmp,
key_bindings = {
accept = false, -- handled by nvim-cmp / blink.cmp
next = "<M-]>",
prev = "<M-[>",
},
},
}
{
"Exafunction/codeium.nvim",
cmd = "Codeium",
build = ":Codeium Auth",
opts = {
enable_cmp_source = vim.g.ai_cmp,
virtual_text = {
enabled = not vim.g.ai_cmp,
key_bindings = {
accept = false, -- handled by nvim-cmp / blink.cmp
next = "<M-]>",
prev = "<M-[>",
},
},
},
}
codeium.nvim
add ai_accept action
- Options
- Full Spec
opts = function()
LazyVim.cmp.actions.ai_accept = function()
if require("codeium.virtual_text").get_current_completion_item() then
LazyVim.create_undo()
vim.api.nvim_input(require("codeium.virtual_text").accept())
return true
end
end
end
{
"Exafunction/codeium.nvim",
opts = function()
LazyVim.cmp.actions.ai_accept = function()
if require("codeium.virtual_text").get_current_completion_item() then
LazyVim.create_undo()
vim.api.nvim_input(require("codeium.virtual_text").accept())
return true
end
end
end,
}
codeium.nvim
- Options
- Full Spec
opts = nil
{ "codeium.nvim" }
codeium.nvim
- Options
- Full Spec
opts = nil
{
"codeium.nvim",
vim.g.ai_cmp and "saghen/blink.compat" or nil,
}
nvim-cmp (optional)
codeium cmp source
- Options
- Full Spec
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "codeium",
group_index = 1,
priority = 100,
})
end
{
"nvim-cmp",
optional = true,
dependencies = { "codeium.nvim" },
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "codeium",
group_index = 1,
priority = 100,
})
end,
}
lualine.nvim (optional)
- Options
- Full Spec
opts = function(_, opts)
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
end
{
"nvim-lualine/lualine.nvim",
optional = true,
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
end,
}
blink.cmp (optional)
- Options
- Full Spec
opts = {
sources = {
compat = vim.g.ai_cmp and { "codeium" } or nil,
},
}
{
"saghen/blink.cmp",
optional = true,
opts = {
sources = {
compat = vim.g.ai_cmp and { "codeium" } or nil,
},
},
dependencies = {
"codeium.nvim",
vim.g.ai_cmp and "saghen/blink.compat" or nil,
},
}