Skip to content

Commit

Permalink
Add helpful copilot icons
Browse files Browse the repository at this point in the history
  • Loading branch information
tarebyte committed Jun 9, 2024
1 parent 550fccb commit 9ab5058
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .config/nvim/lua/plugins/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,16 @@ return {
-- Remove Copilot status
local copilot = table.remove(opts.sections.lualine_x, 2)

copilot[1] = function()
local kinds = require("lazyvim.config").icons.kinds
local copilotIcons = {
[""] = require("lazyvim.config").icons.kinds.Copilot,
["Normal"] = require("lazyvim.config").icons.kinds.Copilot,
["Warning"] = "",
["InProgress"] = "",
}

local icon = kinds.Copilot
copilot[1] = function()
local status = require("copilot.api").status.data

if status.status == "Warning" then
icon = kinds.CopilotWarning
end
local icon = copilotIcons[status.status] or copilotIcons[""]

return icon .. (status.message or "")
end
Expand Down

0 comments on commit 9ab5058

Please sign in to comment.