fix(nvim): make heirline lsp info show correctly

This commit is contained in:
Price Hiller 2024-06-13 23:24:49 -05:00
parent 01d4014922
commit b10e1aebf5
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -582,30 +582,30 @@ return {
return { fg = colors.oniViolet, bg = bg } return { fg = colors.oniViolet, bg = bg }
end, end,
}, },
},
{
condition = utils.lsp_attached,
{ {
provider = function() condition = conditions.lsp_attached,
local names = {} {
for _, server in provider = function()
ipairs(vim.lsp.get_clients({ bufnr = vim.api.nvim_get_current_buf() })) local names = {}
do for _, server in
table.insert(names, server.name) ipairs(vim.lsp.get_clients({ bufnr = vim.api.nvim_get_current_buf() }))
end do
return " " .. table.concat(names, ", ") table.insert(names, server.name)
end, end
hl = { fg = colors.sumiInk0, bg = colors.oniViolet2 }, return " " .. table.concat(names, ", ")
}, end,
{ hl = { fg = colors.sumiInk0, bg = colors.oniViolet2 },
provider = seps.full.right, },
hl = function() {
local bg = utils.get_highlight("WinBar").bg provider = seps.full.right,
if conditions.has_diagnostics() then hl = function()
bg = colors.sumiInk4 local bg = utils.get_highlight("WinBar").bg
end if conditions.has_diagnostics() then
return { fg = colors.oniViolet2, bg = bg } bg = colors.sumiInk4
end, end
return { fg = colors.oniViolet2, bg = bg }
end,
},
}, },
}, },
}, },