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"] = {
icon = "",
color = colors.red,
name = "robots"
name = "robots",
},
toml = {
icon = "",
@ -105,7 +105,7 @@ icons.setup {
ttf = {
icon = "",
color = colors.white,
name = "TrueTypeFont"
name = "TrueTypeFont",
},
rb = {
icon = "",
@ -125,12 +125,12 @@ icons.setup {
woff = {
icon = "",
color = colors.white,
name = "WebOpenFontFormat"
name = "WebOpenFontFormat",
},
woff2 = {
icon = "",
color = colors.white,
name = "WebOpenFontFormat2"
name = "WebOpenFontFormat2",
},
xz = {
icon = "",

View File

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