fix : shortline for small screens (#468)
This commit is contained in:
parent
7051afe43c
commit
ac28a9f99e
1 changed files with 30 additions and 0 deletions
|
@ -84,6 +84,9 @@ components.active[1][2] = {
|
|||
end
|
||||
return " " .. icon .. " " .. filename .. " "
|
||||
end,
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 70
|
||||
end,
|
||||
hl = {
|
||||
fg = colors.white,
|
||||
bg = colors.lightbg,
|
||||
|
@ -98,6 +101,10 @@ components.active[1][3] = {
|
|||
return " " .. dir_name .. " "
|
||||
end,
|
||||
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 80
|
||||
end,
|
||||
|
||||
hl = {
|
||||
fg = colors.grey_fg2,
|
||||
bg = colors.lightbg2,
|
||||
|
@ -143,6 +150,7 @@ components.active[1][7] = {
|
|||
enabled = function()
|
||||
return lsp.diagnostics_exist "Error"
|
||||
end,
|
||||
|
||||
hl = { fg = colors.red },
|
||||
icon = " ",
|
||||
}
|
||||
|
@ -204,6 +212,9 @@ components.active[2][1] = {
|
|||
end
|
||||
return ""
|
||||
end,
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 80
|
||||
end,
|
||||
hl = { fg = colors.green },
|
||||
}
|
||||
|
||||
|
@ -215,11 +226,17 @@ components.active[3][1] = {
|
|||
return ""
|
||||
end
|
||||
end,
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 70
|
||||
end,
|
||||
hl = { fg = colors.grey_fg2, bg = colors.statusline_bg },
|
||||
}
|
||||
|
||||
components.active[3][2] = {
|
||||
provider = "git_branch",
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 70
|
||||
end,
|
||||
hl = {
|
||||
fg = colors.grey_fg2,
|
||||
bg = colors.statusline_bg,
|
||||
|
@ -294,6 +311,9 @@ components.active[3][6] = {
|
|||
|
||||
components.active[3][7] = {
|
||||
provider = statusline_style.left,
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 90
|
||||
end,
|
||||
hl = {
|
||||
fg = colors.grey,
|
||||
bg = colors.one_bg,
|
||||
|
@ -302,6 +322,9 @@ components.active[3][7] = {
|
|||
|
||||
components.active[3][8] = {
|
||||
provider = statusline_style.left,
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 90
|
||||
end,
|
||||
hl = {
|
||||
fg = colors.green,
|
||||
bg = colors.grey,
|
||||
|
@ -310,6 +333,9 @@ components.active[3][8] = {
|
|||
|
||||
components.active[3][9] = {
|
||||
provider = statusline_style.position_icon,
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 90
|
||||
end,
|
||||
hl = {
|
||||
fg = colors.black,
|
||||
bg = colors.green,
|
||||
|
@ -330,6 +356,10 @@ components.active[3][10] = {
|
|||
return " " .. result .. "%% "
|
||||
end,
|
||||
|
||||
enabled = function(winid)
|
||||
return vim.api.nvim_win_get_width(winid) > 90
|
||||
end,
|
||||
|
||||
hl = {
|
||||
fg = colors.green,
|
||||
bg = colors.one_bg,
|
||||
|
|
Loading…
Reference in a new issue