fix: Disabling shortline from chadrc

missed in 317eedd9b2

chore: format files
This commit is contained in:
Akianonymus 2021-10-14 10:57:28 +05:30 committed by siduck76
parent 1b4a67a1e1
commit 9a45bb3f20
2 changed files with 30 additions and 30 deletions

View File

@ -90,7 +90,7 @@ icons.setup {
["robots.txt"] = { ["robots.txt"] = {
icon = "", icon = "",
color = colors.red, color = colors.red,
name = "robots" name = "robots",
}, },
toml = { toml = {
icon = "", icon = "",
@ -105,7 +105,7 @@ icons.setup {
ttf = { ttf = {
icon = "", icon = "",
color = colors.white, color = colors.white,
name = "TrueTypeFont" name = "TrueTypeFont",
}, },
rb = { rb = {
icon = "", icon = "",
@ -125,12 +125,12 @@ icons.setup {
woff = { woff = {
icon = "", icon = "",
color = colors.white, color = colors.white,
name = "WebOpenFontFormat" name = "WebOpenFontFormat",
}, },
woff2 = { woff2 = {
icon = "", icon = "",
color = colors.white, color = colors.white,
name = "WebOpenFontFormat2" name = "WebOpenFontFormat2",
}, },
xz = { xz = {
icon = "", icon = "",

View File

@ -47,7 +47,7 @@ local config = require("core.utils").load_config().plugins.options.statusline
local user_statusline_style = config.style local user_statusline_style = config.style
local statusline_style = icon_styles[user_statusline_style] local statusline_style = icon_styles[user_statusline_style]
-- if show short statusline on small screens -- if show short statusline on small screens
local shortline = config.shortline local shortline = config.shortline == false and true
-- Initialize the components table -- Initialize the components table
local components = { local components = {
@ -85,7 +85,7 @@ components.active[1][2] = {
end end
return " " .. icon .. " " .. filename .. " " return " " .. icon .. " " .. filename .. " "
end, end,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 70 return vim.api.nvim_win_get_width(winid) > 70
end, end,
hl = { hl = {
@ -102,7 +102,7 @@ components.active[1][3] = {
return "" .. dir_name .. " " return "" .. dir_name .. " "
end, end,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 80 return vim.api.nvim_win_get_width(winid) > 80
end, end,
@ -213,7 +213,7 @@ components.active[2][1] = {
end end
return "" return ""
end, end,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 80 return vim.api.nvim_win_get_width(winid) > 80
end, end,
hl = { fg = colors.green }, hl = { fg = colors.green },
@ -227,7 +227,7 @@ components.active[3][1] = {
return "" return ""
end end
end, end,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 70 return vim.api.nvim_win_get_width(winid) > 70
end, end,
hl = { fg = colors.grey_fg2, bg = colors.statusline_bg }, hl = { fg = colors.grey_fg2, bg = colors.statusline_bg },
@ -235,7 +235,7 @@ components.active[3][1] = {
components.active[3][2] = { components.active[3][2] = {
provider = "git_branch", provider = "git_branch",
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 70 return vim.api.nvim_win_get_width(winid) > 70
end, end,
hl = { hl = {
@ -312,7 +312,7 @@ components.active[3][6] = {
components.active[3][7] = { components.active[3][7] = {
provider = statusline_style.left, provider = statusline_style.left,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 90 return vim.api.nvim_win_get_width(winid) > 90
end, end,
hl = { hl = {
@ -323,7 +323,7 @@ components.active[3][7] = {
components.active[3][8] = { components.active[3][8] = {
provider = statusline_style.left, provider = statusline_style.left,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 90 return vim.api.nvim_win_get_width(winid) > 90
end, end,
hl = { hl = {
@ -334,7 +334,7 @@ components.active[3][8] = {
components.active[3][9] = { components.active[3][9] = {
provider = statusline_style.position_icon, provider = statusline_style.position_icon,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 90 return vim.api.nvim_win_get_width(winid) > 90
end, end,
hl = { hl = {
@ -357,7 +357,7 @@ components.active[3][10] = {
return " " .. result .. "%% " return " " .. result .. "%% "
end, end,
enabled = shortline and function(winid) enabled = shortline or function(winid)
return vim.api.nvim_win_get_width(winid) > 90 return vim.api.nvim_win_get_width(winid) > 90
end, end,