From 412796092800c89c0099082b1e27365d92f00df6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 16 Mar 2026 00:45:31 -0700 Subject: [PATCH] fix(ai): codeium not available after auth (#6926) - Change event from InsertEnter to BufReadPost to load plugin when opening files This ensures Codeium is initialized before statusline rendering and provides completions immediately when editing a file. - Improve lualine status component to check if codeium is loaded Previously used cmp_source which depends on cmp being loaded and registered. Now checks if the codeium module is available, providing better feedback. Fixes issue where codeium showed no status on statusline and no completions after successful authentication. --- lua/lazyvim/plugins/extras/ai/codeium.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index 8d37d750..8509b0db 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -4,7 +4,7 @@ return { { "Exafunction/codeium.nvim", cmd = "Codeium", - event = "InsertEnter", + event = "BufReadPost", build = ":Codeium Auth", opts = { enable_cmp_source = vim.g.ai_cmp, @@ -52,7 +52,13 @@ return { optional = true, event = "VeryLazy", opts = function(_, opts) - table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium")) + table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.status(LazyVim.config.icons.kinds.Codeium, function() + local codeium_enabled = package.loaded["codeium"] ~= nil + if not codeium_enabled then + return + end + return "ok" + end)) end, },