Show current attached LSP count
This commit is contained in:
parent
a351ad691b
commit
ee344af9f5
1 changed files with 8 additions and 2 deletions
|
|
@ -2,11 +2,17 @@
|
||||||
|
|
||||||
local lualine = require('lualine');
|
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 {
|
lualine.setup {
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = {'mode'},
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
lualine_b = {'branch', 'diff', 'diagnostics', active_lsps },
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
'filename',
|
'filename',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue