diff --git a/.config/nvim/lua/plugins/extras/coding/ai/codeium.lua b/.config/nvim/lua/plugins/extras/coding/ai/codeium.lua index af18fdd2..be05d835 100644 --- a/.config/nvim/lua/plugins/extras/coding/ai/codeium.lua +++ b/.config/nvim/lua/plugins/extras/coding/ai/codeium.lua @@ -1,31 +1,51 @@ return { - "Exafunction/codeium.vim", - event = "BufEnter", - config = function() - vim.g.codeium_disable_bindings = 1 + { + "Exafunction/codeium.vim", + event = "BufEnter", + config = function() + vim.g.codeium_filetypes = { + ["TelescopePrompt"] = false, + } - vim.keymap.set("i", "", function() - return vim.fn["codeium#Accept"]() - end, { expr = true }) + vim.g.codeium_disable_bindings = 1 - vim.keymap.set("i", "", function() - return vim.fn["codeium#CycleCompletions"](1) - end, { expr = true }) + vim.keymap.set("i", "", function() + return vim.fn["codeium#Accept"]() + end, { expr = true }) - vim.keymap.set("i", "", function() - return vim.fn["codeium#CycleCompletions"](-1) - end, { expr = true }) + vim.keymap.set("i", "", function() + return vim.fn["codeium#CycleCompletions"](1) + end, { expr = true }) - vim.keymap.set("i", "", function() - return vim.fn["codeium#Clear"]() - end, { expr = true }) + vim.keymap.set("i", "", function() + return vim.fn["codeium#CycleCompletions"](-1) + end, { expr = true }) - vim.keymap.set("n", "cC", function() - if vim.g.codeium_enabled == true then - vim.cmd("CodeiumDisable") - else - vim.cmd("CodeiumEnable") + vim.keymap.set("i", "", function() + return vim.fn["codeium#Clear"]() + end, { expr = true }) + + vim.keymap.set("n", "cC", function() + if vim.g.codeium_enabled == true then + vim.cmd("CodeiumDisable") + else + vim.cmd("CodeiumEnable") + end + end, { noremap = true, desc = "Toggle Codeium" }) + end, + }, + { + "nvim-lualine/lualine.nvim", + optional = true, + event = "VeryLazy", + opts = function(_, opts) + local icon = require("lazyvim.config").icons.kinds.Codeium + local function show_codeium_status() + return icon .. vim.fn["codeium#GetStatusString"]() end - end, { noremap = true, desc = "Toggle Codeium" }) - end, + + -- Insert the icon + table.insert(opts.sections.lualine_x, 2, show_codeium_status) + end, + }, }