mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-07 19:35:17 +02:00
add: codeium config
This commit is contained in:
parent
8677303d6d
commit
a0c81f7286
10 changed files with 308 additions and 234 deletions
|
@ -86,6 +86,7 @@ return {
|
|||
luasnip = "(Snippet)",
|
||||
buffer = "(Buffer)",
|
||||
path = "(Path)",
|
||||
codeium = "(Codeium)",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
|
|
|
@ -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.
|
||||
|
|
27
lua/plugins/codeiumnvim.lua
Normal file
27
lua/plugins/codeiumnvim.lua
Normal 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
|
|
@ -24,4 +24,8 @@ _G.extract = function(text)
|
|||
return result
|
||||
end
|
||||
|
||||
_G.all_trim = function(s)
|
||||
return s:match "^%s*(.-)%s*$"
|
||||
end
|
||||
|
||||
return {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue