dotfiles-pub/common/nvim/after/plugin/lualine.lua

110 lines
1.9 KiB
Lua

local theme = require("lualine.themes.16color")
theme.normal.a.bg = 7
theme.visual.a.bg = 4
theme.command = {
a = {bg = 6},
}
theme.terminal = {
a = {bg = 5},
}
theme.normal.c.bg = "none"
require("lualine").setup({
options = {
icons_enabled = false,
theme = theme,
section_separators = "",
component_separators = "",
disabled_filetypes = {
statusline = {"NvimTree", "undotree", "diff"},
},
},
sections = {
lualine_a = {
{
"mode",
color = {
fg = 0,
},
fmt = function(str)
return str:sub(1,3)
end
},
},
lualine_b = {
{
"branch",
color = {
bg = 5,
fg = 0,
},
},
{
"diff",
diff_color = {
added = {bg = 8, fg = 2},
modified = {bg = 8, fg = 3},
removed = {bg = 8, fg = 1},
},
},
{
"diagnostics",
sections = {"error", "warn", "info", "hint"},
diagnostics_color = {
error = {bg = 0, fg = 1},
warn = {bg = 0, fg = 3},
info = {bg = 0, fg = 7},
hint = {bg = 0, fg = 6},
},
},
},
lualine_c = {
{
"filename",
color = {
bg = "none",
fg = 5,
},
},
},
lualine_x = {
{
"location",
color = {
bg = 4,
fg = 0,
},
},
},
lualine_y = {
{
"encoding",
color = {
bg = 3,
fg = 0,
},
},
{
"fileformat",
color = {
bg = 3,
fg = 0,
},
padding = {
left = 0,
right = 1,
},
},
},
lualine_z = {
{
"filetype",
color = {
bg = 7,
fg = 0,
},
},
},
},
})