diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 54974b6e..574938f7 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -17,16 +17,26 @@ return { optional = true, event = "VeryLazy", opts = function(_, opts) - table.insert( - opts.sections.lualine_x, - 2, - LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local icons = { + Error = { " ", "DiagnosticError" }, + Inactive = { " ", "MsgArea" }, + Warning = { " ", "DiagnosticWarn" }, + Normal = { LazyVim.config.icons.kinds.Copilot, "Special" }, + } + table.insert(opts.sections.lualine_x, 2, { + function() local status = require("sidekick.status").get() - if status then - return status.kind == "Error" and "error" or status.busy and "pending" or "ok" - end - end) - ) + return status and vim.tbl_get(icons, status.kind, 1) + end, + cond = function() + return require("sidekick.status").get() ~= nil + end, + color = function() + local status = require("sidekick.status").get() + local hl = status and (status.busy and "DiagnosticWarn" or vim.tbl_get(icons, status.kind, 2)) + return { fg = Snacks.util.color(hl) } + end, + }) end, },