dotfiles/config/nvim/lua/fschauen/plugins/lualine.lua

56 lines
1.7 KiB
Lua

return {
"nvim-lualine/lualine.nvim",
dependencies = "nvim-tree/nvim-web-devicons",
opts = function()
local dynamic_color = require("fschauen.util.lualine").dynamic_color
local window = require("fschauen.util.window")
local orange = "#d65d0e"
local autoformat = require("fschauen.util.autoformat").lualine()
local branch = {
"branch",
icon = require("fschauen.util.icons").git.Branch,
cond = window.is_medium,
}
local diagnostics = dynamic_color("diagnostics")
local fileformat = { "fileformat", cond = window.is_medium }
local filename = "fschauen.filename"
local filetype = { dynamic_color("filetype"), cond = window.is_medium }
local mode = "fschauen.mode"
local searchcount = "fschauen.searchcount"
local spell = "fschauen.spell"
local status =
{ dynamic_color("fschauen.status"), color = { fg = orange }, padding = 0 }
local whitespace = { dynamic_color("fschauen.whitespace"), color = { bg = orange } }
local wrap = "fschauen.wrap"
local sections = {
lualine_a = { mode },
lualine_b = { branch },
lualine_c = { filename, status },
lualine_x = { diagnostics, searchcount, filetype },
lualine_y = { spell, wrap, autoformat, fileformat, "progress" },
lualine_z = { "location", whitespace },
}
return {
options = {
icons_enabled = true,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
},
sections = sections,
inactive_sections = sections,
extensions = {
"fugitive",
"quickfix",
"nvim-tree",
"lazy",
"man",
"trouble",
},
}
end,
}