refactor(nvim): improve lsp diag appearance in winbar
This commit is contained in:
parent
a4d87f70bd
commit
fdced578a4
@ -595,7 +595,7 @@ return {
|
|||||||
hl = function()
|
hl = function()
|
||||||
local bg = utils.get_highlight("WinBar").bg
|
local bg = utils.get_highlight("WinBar").bg
|
||||||
if conditions.has_diagnostics() then
|
if conditions.has_diagnostics() then
|
||||||
bg = colors.sumiInk2
|
bg = colors.sumiInk4
|
||||||
end
|
end
|
||||||
return { fg = colors.oniViolet2, bg = bg }
|
return { fg = colors.oniViolet2, bg = bg }
|
||||||
end,
|
end,
|
||||||
@ -619,36 +619,41 @@ return {
|
|||||||
update = { "DiagnosticChanged", "BufEnter" },
|
update = { "DiagnosticChanged", "BufEnter" },
|
||||||
{
|
{
|
||||||
provider = " ",
|
provider = " ",
|
||||||
hl = { fg = colors.sumiInk2, bg = colors.sumiInk2 },
|
hl = { fg = colors.sumiInk4, bg = colors.sumiInk4 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider = function(self)
|
provider = function(self)
|
||||||
-- 0 is just another output, we can decide to print it or not!
|
-- 0 is just another output, we can decide to print it or not!
|
||||||
return self.errors > 0 and (self.error_icon .. self.errors .. " ")
|
return self.errors > 0 and (self.error_icon .. self.errors .. " ")
|
||||||
end,
|
end,
|
||||||
hl = { fg = utils.get_highlight("DiagnosticError").fg, bg = colors.sumiInk2 },
|
hl = { fg = utils.get_highlight("DiagnosticError").fg, bg = colors.sumiInk4 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider = function(self)
|
provider = function(self)
|
||||||
return self.warnings > 0 and (self.warn_icon .. self.warnings .. " ")
|
return self.warnings > 0 and (self.warn_icon .. self.warnings .. " ")
|
||||||
end,
|
end,
|
||||||
hl = { fg = utils.get_highlight("DiagnosticWarn").fg, bg = colors.sumiInk2 },
|
hl = { fg = utils.get_highlight("DiagnosticWarn").fg, bg = colors.sumiInk4 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider = function(self)
|
provider = function(self)
|
||||||
return self.info > 0 and (self.info_icon .. self.info .. " ")
|
return self.info > 0 and (self.info_icon .. self.info .. " ")
|
||||||
end,
|
end,
|
||||||
hl = { fg = utils.get_highlight("DiagnosticInfo").fg, bg = colors.sumiInk2 },
|
hl = { fg = utils.get_highlight("DiagnosticInfo").fg, bg = colors.sumiInk4 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider = function(self)
|
provider = function(self)
|
||||||
return self.hints > 0 and (self.hint_icon .. self.hints)
|
return self.hints > 0 and (self.hint_icon .. self.hints)
|
||||||
end,
|
end,
|
||||||
hl = { fg = utils.get_highlight("DiagnosticHint").fg, bg = colors.sumiInk2 },
|
hl = { fg = utils.get_highlight("DiagnosticHint").fg, bg = colors.sumiInk4 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider = seps.full.right,
|
provider = seps.full.right,
|
||||||
hl = { fg = colors.sumiInk2, bg = utils.get_highlight("WinBar").bg },
|
hl = function()
|
||||||
|
return {
|
||||||
|
fg = colors.sumiInk4,
|
||||||
|
bg = utils.get_highlight("WinBar").bg,
|
||||||
|
}
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -957,7 +962,7 @@ return {
|
|||||||
provider = seps.full.right,
|
provider = seps.full.right,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.lightBlue,
|
fg = colors.lightBlue,
|
||||||
bg = colors.waveAqua2
|
bg = colors.waveAqua2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -968,7 +973,7 @@ return {
|
|||||||
end,
|
end,
|
||||||
hl = {
|
hl = {
|
||||||
fg = colors.sumiInk0,
|
fg = colors.sumiInk0,
|
||||||
bg = colors.waveAqua2
|
bg = colors.waveAqua2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user