1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 11:24: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)
end
local function lsp_info()
local num_clients = tostring(#vim.tbl_keys(vim.lsp.get_clients()))
return "" .. num_clients
end
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
dependencies = {
"nvim-tree/nvim-web-devicons",
"arkav/lualine-lsp-progress",
"nvim-tree/nvim-web-devicons",
"pnx/lualine-lsp-status",
},
opts = {
options = {
@ -32,6 +28,7 @@ return {
"neo-tree",
}
},
-- theme = "catppuccin"
theme = {
normal = {
a = "StatusLineNormal",
@ -67,9 +64,18 @@ return {
},
},
lualine_b = {
"branch",
-- '" " .. tostring(#vim.tbl_keys(vim.lsp.buf_get_clients()))',
lsp_info,
{"branch"},
{
"lsp-status",
colors = {},
on_click = function (_, btn, _)
if btn == "l" then
vim.cmd(":LspInfo")
elseif btn == "r" then
vim.cmd(":LspRestart")
end
end
},
{
"diagnostics",
symbols = {