34 lines
733 B
Django/Jinja
34 lines
733 B
Django/Jinja
-- {{ ansible_managed }}
|
|
|
|
local lualine = require('lualine');
|
|
|
|
local function active_lsps()
|
|
local buffer = vim.api.nvim_get_current_buf()
|
|
local attached_clients = vim.lsp.get_clients({ bufnr = buffer })
|
|
|
|
if #attached_clients == 0 then return 'LSP: 0' end
|
|
|
|
local preview_client = attached_clients[1]
|
|
|
|
return ('LSP: %s (%d)'):format(preview_client.name, #attached_clients)
|
|
end
|
|
|
|
lualine.setup {
|
|
sections = {
|
|
lualine_a = {'mode'},
|
|
lualine_b = {'branch', 'diff', 'diagnostics', active_lsps },
|
|
lualine_c = {
|
|
{
|
|
'filename',
|
|
path = 1,
|
|
}
|
|
},
|
|
lualine_x = {
|
|
'encoding',
|
|
'fileformat',
|
|
'filetype'
|
|
},
|
|
lualine_y = {'progress'},
|
|
lualine_z = {'location'}
|
|
},
|
|
}
|