Show current attached LSP count

This commit is contained in:
Sonny Bakker 2025-02-13 22:05:49 +01:00
parent a351ad691b
commit ee344af9f5

View file

@ -2,11 +2,17 @@
local lualine = require('lualine');
-- TODO: show attached LSP count
local function active_lsps()
local buffer = vim.api.nvim_get_current_buf()
local client_count = #vim.lsp.get_clients({ buffer = buffer })
return ('LSP: %d'):format(client_count)
end
lualine.setup {
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_b = {'branch', 'diff', 'diagnostics', active_lsps },
lualine_c = {
{
'filename',