@@ -111,16 +111,26 @@ end
111
111
112
112
``` lua
113
113
opts = function (_ , opts )
114
- table.insert (
115
- opts .sections .lualine_x ,
116
- 2 ,
117
- LazyVim .lualine .status (LazyVim .config .icons .kinds .Copilot , function ()
114
+ local icons = {
115
+ Error = { " " , " DiagnosticError" },
116
+ Inactive = { " " , " MsgArea" },
117
+ Warning = { " " , " DiagnosticWarn" },
118
+ Normal = { LazyVim .config .icons .kinds .Copilot , " Special" },
119
+ }
120
+ table.insert (opts .sections .lualine_x , 2 , {
121
+ function ()
118
122
local status = require (" sidekick.status" ).get ()
119
- if status then
120
- return status .kind == " Error" and " error" or status .busy and " pending" or " ok"
121
- end
122
- end )
123
- )
123
+ return status and vim .tbl_get (icons , status .kind , 1 )
124
+ end ,
125
+ cond = function ()
126
+ return require (" sidekick.status" ).get () ~= nil
127
+ end ,
128
+ color = function ()
129
+ local status = require (" sidekick.status" ).get ()
130
+ local hl = status and (status .busy and " DiagnosticWarn" or vim .tbl_get (icons , status .kind , 2 ))
131
+ return { fg = Snacks .util .color (hl ) }
132
+ end ,
133
+ })
124
134
end
125
135
```
126
136
@@ -135,16 +145,26 @@ end
135
145
optional = true ,
136
146
event = " VeryLazy" ,
137
147
opts = function (_ , opts )
138
- table.insert (
139
- opts .sections .lualine_x ,
140
- 2 ,
141
- LazyVim .lualine .status (LazyVim .config .icons .kinds .Copilot , function ()
148
+ local icons = {
149
+ Error = { " " , " DiagnosticError" },
150
+ Inactive = { " " , " MsgArea" },
151
+ Warning = { " " , " DiagnosticWarn" },
152
+ Normal = { LazyVim .config .icons .kinds .Copilot , " Special" },
153
+ }
154
+ table.insert (opts .sections .lualine_x , 2 , {
155
+ function ()
156
+ local status = require (" sidekick.status" ).get ()
157
+ return status and vim .tbl_get (icons , status .kind , 1 )
158
+ end ,
159
+ cond = function ()
160
+ return require (" sidekick.status" ).get () ~= nil
161
+ end ,
162
+ color = function ()
142
163
local status = require (" sidekick.status" ).get ()
143
- if status then
144
- return status .kind == " Error" and " error" or status .busy and " pending" or " ok"
145
- end
146
- end )
147
- )
164
+ local hl = status and (status .busy and " DiagnosticWarn" or vim .tbl_get (icons , status .kind , 2 ))
165
+ return { fg = Snacks .util .color (hl ) }
166
+ end ,
167
+ })
148
168
end ,
149
169
}
150
170
```
0 commit comments