local function has_lsp() local buf = vim.api.nvim_get_current_buf() local clients = vim.lsp.get_clients({ bufnr = buf }) return #clients > 0 end local function language_servers() local buf = vim.api.nvim_get_current_buf() local clients = vim.lsp.get_clients({ bufnr = buf }) -- Shouldn't happen as we have the above has_lsp func but just in case if #clients == 0 then return "none" end local names = "" for _, client in ipairs(clients) do names = names .. client.name .. " " end return names end return { { "stevearc/dressing.nvim", opts = {}, }, { "rcarriga/nvim-notify", opts = {}, }, { "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = { options = { disabled_filetypes = { "neo-tree" }, globalstatus = true, }, sections = { lualine_y = { "progress", { language_servers, cond = has_lsp, }, }, }, }, }, }