add: codeium config

This commit is contained in:
asep.komarudin 2024-06-05 12:28:31 +07:00
parent 8677303d6d
commit a0c81f7286
10 changed files with 308 additions and 234 deletions

View file

@ -86,6 +86,7 @@ return {
luasnip = "(Snippet)",
buffer = "(Buffer)",
path = "(Path)",
codeium = "(Codeium)",
})[entry.source.name]
return vim_item
end,

View file

@ -3,8 +3,9 @@ if vim.g.pcode_codeium then
M.codeium = {
"Exafunction/codeium.vim",
enabled = true,
-- event = "BufEnter",
event = "InsertEnter",
version = "1.8.37",
event = "BufWinEnter",
-- event = "InsertEnter",
config = function()
vim.g.codeium_disable_bindings = 1
-- Change '<C-g>' here to any keycode you like.

View file

@ -0,0 +1,27 @@
if vim.g.pcode_codeium_nvim then
return {
-- codeium cmp source
{
"nvim-cmp",
dependencies = {
-- codeium
{
"Exafunction/codeium.nvim",
cmd = "Codeium",
build = ":Codeium Auth",
opts = {},
},
},
--@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "codeium",
group_index = 1,
priority = 100,
})
end,
},
}
else
return {}
end

View file

@ -24,4 +24,8 @@ _G.extract = function(text)
return result
end
_G.all_trim = function(s)
return s:match "^%s*(.-)%s*$"
end
return {}