.dotfiles/.config/nvim/lua/nvwynd/plugins/ui.lua

57 lines
955 B
Lua
Raw Permalink Normal View History

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
2024-05-24 16:07:28 +03:00
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", "minimap" },
globalstatus = true,
},
sections = {
lualine_y = {
"progress",
{
language_servers,
cond = has_lsp,
},
},
},
},
},
2024-05-24 16:07:28 +03:00
}