fix(nvim): properly show bubble for diags when lsp is not attached
This commit is contained in:
parent
2c5ebe5d40
commit
397126cf97
@ -505,8 +505,10 @@ return {
|
|||||||
FileNameBlock,
|
FileNameBlock,
|
||||||
margin(1),
|
margin(1),
|
||||||
{
|
{
|
||||||
condition = conditions.lsp_attached,
|
|
||||||
{
|
{
|
||||||
|
condition = function()
|
||||||
|
return conditions.lsp_attached() or conditions.has_diagnostics()
|
||||||
|
end,
|
||||||
{
|
{
|
||||||
provider = seps.full.left,
|
provider = seps.full.left,
|
||||||
hl = { fg = colors.oniViolet, bg = utils.get_highlight("WinBarNC").bg },
|
hl = { fg = colors.oniViolet, bg = utils.get_highlight("WinBarNC").bg },
|
||||||
@ -520,9 +522,18 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider = seps.full.right,
|
provider = seps.full.right,
|
||||||
hl = { fg = colors.oniViolet, bg = colors.oniViolet2 },
|
hl = function()
|
||||||
|
local bg = colors.oniViolet2
|
||||||
|
if conditions.has_diagnostics() and not conditions.lsp_attached() then
|
||||||
|
bg = colors.sumiInk2
|
||||||
|
end
|
||||||
|
|
||||||
|
return { fg = colors.oniViolet, bg = bg}
|
||||||
|
end
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
condition = conditions.lsp_attached,
|
||||||
{
|
{
|
||||||
update = { "LspAttach", "LspDetach" },
|
update = { "LspAttach", "LspDetach" },
|
||||||
|
|
||||||
@ -545,6 +556,7 @@ return {
|
|||||||
return { fg = colors.oniViolet2, bg = bg }
|
return { fg = colors.oniViolet2, bg = bg }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition = conditions.has_diagnostics,
|
condition = conditions.has_diagnostics,
|
||||||
|
Loading…
Reference in New Issue
Block a user