fix(nvim): properly show bubble for diags when lsp is not attached

This commit is contained in:
Price Hiller 2023-09-04 19:00:19 -05:00
parent 2c5ebe5d40
commit 397126cf97
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -505,8 +505,10 @@ return {
FileNameBlock,
margin(1),
{
condition = conditions.lsp_attached,
{
condition = function()
return conditions.lsp_attached() or conditions.has_diagnostics()
end,
{
provider = seps.full.left,
hl = { fg = colors.oniViolet, bg = utils.get_highlight("WinBarNC").bg },
@ -520,9 +522,18 @@ return {
},
{
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" },
@ -545,6 +556,7 @@ return {
return { fg = colors.oniViolet2, bg = bg }
end,
},
}
},
{
condition = conditions.has_diagnostics,