Compare commits
No commits in common. "bd146ae1d80d327d483706f976c3f59ad1dbb919" and "7d974f5115403f4467d7767790e651db3d741d47" have entirely different histories.
bd146ae1d8
...
7d974f5115
1 changed files with 3 additions and 23 deletions
|
|
@ -4,35 +4,15 @@ local lualine = require('lualine');
|
||||||
|
|
||||||
local function active_lsps()
|
local function active_lsps()
|
||||||
local buffer = vim.api.nvim_get_current_buf()
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
local attached_clients = vim.lsp.get_clients({ bufnr = buffer })
|
local client_count = #vim.lsp.get_clients({ bufnr = buffer })
|
||||||
|
|
||||||
if #attached_clients == 0 then return 'LSP: 0' end
|
return ('LSP: %d'):format(client_count)
|
||||||
|
|
||||||
local preview_client = attached_clients[1]
|
|
||||||
|
|
||||||
return ('LSP: %s (%d)'):format(preview_client.name, #attached_clients)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function diff_source()
|
|
||||||
local gitsigns = vim.b.gitsigns_status_dict
|
|
||||||
if gitsigns then
|
|
||||||
return {
|
|
||||||
added = gitsigns.added,
|
|
||||||
modified = gitsigns.changed,
|
|
||||||
removed = gitsigns.removed
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
lualine.setup {
|
lualine.setup {
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = {'mode'},
|
||||||
lualine_b = {
|
lualine_b = {'branch', 'diff', 'diagnostics', active_lsps },
|
||||||
{'b:gitsigns_head', icon = ''},
|
|
||||||
{'diff', source = diff_source},
|
|
||||||
'diagnostics',
|
|
||||||
active_lsps
|
|
||||||
},
|
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
'filename',
|
'filename',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue