feat(nvim): show active lsps in winbar

This commit is contained in:
Price Hiller 2023-01-17 18:52:01 -06:00
parent a2b7f793b6
commit 27461530f3

View File

@ -60,6 +60,29 @@ lualine.setup({
"macro-recording",
fmt = show_macro_recording,
},
{
function()
local msg = "No Active Lsp"
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
else
msg = ""
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if msg == "" then
msg = client.name
else
msg = msg .. ", " .. client.name
end
end
end
return msg
end,
icon = " LSP:",
color = { fg = "#957fb8" },
},
},
lualine_c = {},
lualine_x = {