|
|
return { |
|
|
"nvim-lualine/lualine.nvim", |
|
|
dependencies = { "nvim-tree/nvim-web-devicons" }, |
|
|
config = function() |
|
|
local lualine = require("lualine") |
|
|
local lazy_status = require("lazy.status") -- to configure lazy pending updates count |
|
|
local custom_default = require("lualine.themes.default") |
|
|
|
|
|
-- configure lualine with modified theme |
|
|
lualine.setup({ |
|
|
options = { |
|
|
theme = "auto", -- automatically detect colorscheme |
|
|
icons_enabled = true, |
|
|
component_separators = { left = "", right = "" }, |
|
|
section_separators = { left = "", right = "" }, |
|
|
disabled_filetypes = { |
|
|
statusline = {}, |
|
|
winbar = {}, |
|
|
}, |
|
|
ignore_focus = {}, |
|
|
always_divide_middle = true, |
|
|
globalstatus = true, -- single statusline for all windows |
|
|
refresh = { |
|
|
statusline = 1000, |
|
|
tabline = 1000, |
|
|
winbar = 1000, |
|
|
}, |
|
|
}, |
|
|
sections = { |
|
|
lualine_a = { "mode" }, |
|
|
lualine_b = { |
|
|
"branch", |
|
|
"diff", |
|
|
{ |
|
|
"diagnostics", |
|
|
sources = { "nvim_diagnostic", "nvim_lsp" }, |
|
|
sections = { "error", "warn", "info", "hint" }, |
|
|
diagnostics_color = { |
|
|
error = "DiagnosticError", |
|
|
warn = "DiagnosticWarn", |
|
|
info = "DiagnosticInfo", |
|
|
hint = "DiagnosticHint", |
|
|
}, |
|
|
symbols = { error = " ", warn = " ", info = " ", hint = " " }, |
|
|
colored = true, |
|
|
update_in_insert = false, |
|
|
always_visible = false, |
|
|
}, |
|
|
}, |
|
|
lualine_c = { |
|
|
{ |
|
|
function() |
|
|
return " " |
|
|
end, |
|
|
color = function() |
|
|
local status = require("sidekick.status").get() |
|
|
if status then |
|
|
return status.kind == "Error" and "DiagnosticError" |
|
|
or status.busy and "DiagnosticWarn" |
|
|
or "Special" |
|
|
end |
|
|
end, |
|
|
cond = function() |
|
|
local status = require("sidekick.status") |
|
|
return status.get() ~= nil |
|
|
end, |
|
|
}, |
|
|
}, |
|
|
lualine_x = { |
|
|
{ |
|
|
lazy_status.updates, |
|
|
cond = lazy_status.has_updates, |
|
|
-- color = { fg = "#ff9e64" }, |
|
|
}, |
|
|
{ "encoding" }, |
|
|
{ "fileformat" }, |
|
|
{ "filetype" }, |
|
|
}, |
|
|
lualine_y = { "progress" }, |
|
|
lualine_z = { "location" }, |
|
|
}, |
|
|
inactive_sections = { |
|
|
lualine_a = {}, |
|
|
lualine_b = {}, |
|
|
lualine_c = { |
|
|
{ |
|
|
"filename", |
|
|
file_status = true, |
|
|
path = 1, |
|
|
}, |
|
|
}, |
|
|
lualine_x = { "location" }, |
|
|
lualine_y = {}, |
|
|
lualine_z = {}, |
|
|
}, |
|
|
tabline = {}, |
|
|
winbar = {}, |
|
|
inactive_winbar = {}, |
|
|
-- extensions = { "neo-tree", "lazy" }, |
|
|
}) |
|
|
end, |
|
|
}
|
|
|
|