1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00

nvim/lua/user/plugins/ui/statusline.lua: use pnx/lualine-lsp-status instead of local function.

This commit is contained in:
Henrik Hautakoski 2024-09-01 14:38:40 +02:00
parent 1da358dff8
commit 90b4dd37e1

View file

@ -6,17 +6,13 @@ local function indent_settings()
.. (vim.bo.shiftwidth == 0 and vim.bo.tabstop or vim.bo.shiftwidth) .. (vim.bo.shiftwidth == 0 and vim.bo.tabstop or vim.bo.shiftwidth)
end end
local function lsp_info()
local num_clients = tostring(#vim.tbl_keys(vim.lsp.get_clients()))
return "" .. num_clients
end
return { return {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
event = "VeryLazy", event = "VeryLazy",
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons",
"arkav/lualine-lsp-progress", "arkav/lualine-lsp-progress",
"nvim-tree/nvim-web-devicons", "pnx/lualine-lsp-status",
}, },
opts = { opts = {
options = { options = {
@ -32,6 +28,7 @@ return {
"neo-tree", "neo-tree",
} }
}, },
-- theme = "catppuccin"
theme = { theme = {
normal = { normal = {
a = "StatusLineNormal", a = "StatusLineNormal",
@ -67,9 +64,18 @@ return {
}, },
}, },
lualine_b = { lualine_b = {
"branch", {"branch"},
-- '" " .. tostring(#vim.tbl_keys(vim.lsp.buf_get_clients()))', {
lsp_info, "lsp-status",
colors = {},
on_click = function (_, btn, _)
if btn == "l" then
vim.cmd(":LspInfo")
elseif btn == "r" then
vim.cmd(":LspRestart")
end
end
},
{ {
"diagnostics", "diagnostics",
symbols = { symbols = {