pojokcodeid.nvim-lazy/lua/plugins/codeioum.lua

31 lines
911 B
Lua
Raw Normal View History

2024-06-02 06:48:51 +07:00
local M = {}
if vim.g.pcode_codeium then
M.codeium = {
"Exafunction/codeium.vim",
enabled = true,
2024-06-05 12:28:31 +07:00
version = "1.8.37",
event = "BufWinEnter",
-- event = "InsertEnter",
2024-06-02 06:48:51 +07:00
config = function()
vim.g.codeium_disable_bindings = 1
-- Change '<C-g>' here to any keycode you like.
vim.keymap.set("i", "<C-g>", function()
return vim.fn["codeium#Accept"]()
end, { expr = true, silent = true })
vim.keymap.set("i", "<c-;>", function()
return vim.fn["codeium#CycleCompletions"](1)
end, { expr = true, silent = true })
vim.keymap.set("i", "<c-,>", function()
return vim.fn["codeium#CycleCompletions"](-1)
end, { expr = true, silent = true })
vim.keymap.set("i", "<c-x>", function()
return vim.fn["codeium#Clear"]()
end, { expr = true, silent = true })
end,
}
else
M.codeium = {}
end
return M.codeium