You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NvChad/lua/statusline.lua

199 lines
4.1 KiB
Lua

4 years ago
local gl = require("galaxyline")
4 years ago
local gls = gl.section
gl.short_line_list = {" "} -- keeping this table { } as empty will show inactive statuslines
4 years ago
local colors = {
bg = "#1e222a",
line_bg = "#1e222a",
4 years ago
fg = "#D8DEE9",
green = "#BBE67E",
orange = "#FF8800",
red = "#DF8890",
lightbg = "#282c34",
4 years ago
nord = "#81A1C1",
greenYel = "#EBCB8B"
4 years ago
}
4 years ago
gls.left[1] = {
4 years ago
leftRounded = {
provider = function()
return ""
end,
highlight = {colors.nord, colors.bg}
}
4 years ago
}
4 years ago
gls.left[2] = {
statusIcon = {
4 years ago
provider = function()
return ""
end,
highlight = {colors.bg, colors.nord},
separator = " ",
separator_highlight = {colors.lightbg, colors.lightbg}
}
4 years ago
}
4 years ago
gls.left[3] = {
FileIcon = {
provider = "FileIcon",
condition = buffer_not_empty,
highlight = {require("galaxyline.provider_fileinfo").get_file_icon_color, colors.lightbg}
}
4 years ago
}
gls.left[4] = {
4 years ago
FileName = {
provider = {"FileName", "FileSize"},
condition = buffer_not_empty,
highlight = {colors.fg, colors.lightbg}
}
4 years ago
}
gls.left[5] = {
4 years ago
teech = {
provider = function()
return ""
end,
separator = " ",
highlight = {colors.lightbg, colors.bg}
}
4 years ago
}
4 years ago
local checkwidth = function()
4 years ago
local squeeze_width = vim.fn.winwidth(0) / 2
if squeeze_width > 40 then
return true
end
return false
4 years ago
end
gls.left[6] = {
4 years ago
DiffAdd = {
provider = "DiffAdd",
condition = checkwidth,
icon = "",
highlight = {colors.greenYel, colors.line_bg}
}
4 years ago
}
gls.left[7] = {
4 years ago
DiffModified = {
provider = "DiffModified",
condition = checkwidth,
icon = "",
highlight = {colors.orange, colors.line_bg}
}
4 years ago
}
gls.left[8] = {
4 years ago
DiffRemove = {
provider = "DiffRemove",
condition = checkwidth,
icon = "",
highlight = {colors.red, colors.line_bg}
}
4 years ago
}
gls.left[9] = {
4 years ago
LeftEnd = {
provider = function()
return " "
end,
separator = " ",
separator_highlight = {colors.line_bg, colors.line_bg},
highlight = {colors.line_bg, colors.line_bg}
}
4 years ago
}
gls.left[10] = {
4 years ago
DiagnosticError = {
provider = "DiagnosticError",
icon = "",
highlight = {colors.red, colors.bg}
}
4 years ago
}
gls.left[11] = {
4 years ago
Space = {
provider = function()
return " "
end,
highlight = {colors.line_bg, colors.line_bg}
}
4 years ago
}
gls.left[12] = {
4 years ago
DiagnosticWarn = {
provider = "DiagnosticWarn",
icon = "",
highlight = {colors.red, colors.bg}
4 years ago
}
4 years ago
}
4 years ago
gls.right[1] = {
4 years ago
GitIcon = {
provider = function()
return ""
end,
condition = require("galaxyline.provider_vcs").check_git_workspace,
highlight = {colors.green, colors.line_bg}
}
}
gls.right[2] = {
4 years ago
GitBranch = {
provider = "GitBranch",
condition = require("galaxyline.provider_vcs").check_git_workspace,
highlight = {colors.green, colors.line_bg}
}
}
gls.right[3] = {
4 years ago
right_LeftRounded = {
provider = function()
return ""
end,
separator = " ",
separator_highlight = {colors.bg, colors.bg},
highlight = {colors.red, colors.bg}
}
4 years ago
}
gls.right[4] = {
ViMode = {
4 years ago
provider = function()
local alias = {
n = "NORMAL",
i = "INSERT",
c = "COMMAND",
V = "VISUAL",
[""] = "VISUAL",
v = "VISUAL",
R = "REPLACE"
}
return alias[vim.fn.mode()]
end,
highlight = {colors.bg, colors.red}
}
4 years ago
}
gls.right[5] = {
4 years ago
PerCent = {
provider = "LinePercent",
separator = " ",
separator_highlight = {colors.red, colors.red},
highlight = {colors.bg, colors.fg}
}
4 years ago
}
4 years ago
gls.right[6] = {
4 years ago
rightRounded = {
provider = function()
return ""
end,
highlight = {colors.fg, colors.bg}
}
4 years ago
}