mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
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.
This commit is contained in:
parent
31caef21fd
commit
4127960928
1 changed files with 8 additions and 2 deletions
|
|
@ -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,
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue