From 9a45bb3f20e42099a985652197714ed2341b8703 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 14 Oct 2021 10:57:28 +0530 Subject: [PATCH] fix: Disabling shortline from chadrc missed in https://github.com/NvChad/NvChad/commit/317eedd9b277b4457fbdfc6314e2cee955531c24 chore: format files --- lua/plugins/configs/icons.lua | 40 +++++++++++++++--------------- lua/plugins/configs/statusline.lua | 20 +++++++-------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lua/plugins/configs/icons.lua b/lua/plugins/configs/icons.lua index 801613d..7f66d3c 100644 --- a/lua/plugins/configs/icons.lua +++ b/lua/plugins/configs/icons.lua @@ -87,11 +87,11 @@ icons.setup { color = colors.cyan, name = "py", }, - ["robots.txt"] = { - icon = "ﮧ", - color = colors.red, - name = "robots" - }, + ["robots.txt"] = { + icon = "ﮧ", + color = colors.red, + name = "robots", + }, toml = { icon = "", color = colors.blue, @@ -102,11 +102,11 @@ icons.setup { color = colors.teal, name = "ts", }, - ttf = { - icon = "", - color = colors.white, - name = "TrueTypeFont" - }, + ttf = { + icon = "", + color = colors.white, + name = "TrueTypeFont", + }, rb = { icon = "", color = colors.pink, @@ -122,16 +122,16 @@ icons.setup { color = colors.vibrant_green, name = "vue", }, - woff = { - icon = "", - color = colors.white, - name = "WebOpenFontFormat" - }, - woff2 = { - icon = "", - color = colors.white, - name = "WebOpenFontFormat2" - }, + woff = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat", + }, + woff2 = { + icon = "", + color = colors.white, + name = "WebOpenFontFormat2", + }, xz = { icon = "", color = colors.sun, diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1f7aa44..2a1e6c4 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -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,