diff options
| author | Abouzar Parvan <[email protected]> | 2021-09-15 23:41:21 +0430 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-15 23:41:21 +0430 | 
| commit | df0da6fc75c60c8bd2791b7cdb9d05d12a25bb50 (patch) | |
| tree | de8a9837733d3b8aece0103b40aa8e16b1d277bf /lua/core/lualine | |
| parent | edcf15ba672986cb90358e739d801919f4cf91e0 (diff) | |
[bugfix] Update lualine according to the breaking changes (#1558)
Diffstat (limited to 'lua/core/lualine')
| -rw-r--r-- | lua/core/lualine/components.lua | 44 | ||||
| -rw-r--r-- | lua/core/lualine/styles.lua | 12 | 
2 files changed, 28 insertions, 28 deletions
| diff --git a/lua/core/lualine/components.lua b/lua/core/lualine/components.lua index c6800f49..21e25585 100644 --- a/lua/core/lualine/components.lua +++ b/lua/core/lualine/components.lua @@ -17,31 +17,32 @@ return {      function()        return " "      end, -    left_padding = 0, -    right_padding = 0, +    padding = { left = 0, right = 0 },      color = {}, -    condition = nil, +    cond = nil,    },    branch = {      "b:gitsigns_head",      icon = " ",      color = { gui = "bold" }, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,    },    filename = {      "filename",      color = {}, -    condition = nil, +    cond = nil,    },    diff = {      "diff",      source = diff_source,      symbols = { added = "  ", modified = "柳", removed = " " }, -    color_added = { fg = colors.green }, -    color_modified = { fg = colors.yellow }, -    color_removed = { fg = colors.red }, +    diff_color = { +      added = { fg = colors.green }, +      modified = { fg = colors.yellow }, +      removed = { fg = colors.red }, +    },      color = {}, -    condition = nil, +    cond = nil,    },    python_env = {      function() @@ -60,14 +61,14 @@ return {        return ""      end,      color = { fg = colors.green }, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,    },    diagnostics = {      "diagnostics",      sources = { "nvim_lsp" },      symbols = { error = " ", warn = " ", info = " ", hint = " " },      color = {}, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,    },    treesitter = {      function() @@ -78,7 +79,7 @@ return {        return ""      end,      color = { fg = colors.green }, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,    },    lsp = {      function(msg) @@ -118,10 +119,10 @@ return {      end,      icon = " ",      color = { gui = "bold" }, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,    }, -  location = { "location", condition = conditions.hide_in_width, color = {} }, -  progress = { "progress", condition = conditions.hide_in_width, color = {} }, +  location = { "location", cond = conditions.hide_in_width, color = {} }, +  progress = { "progress", cond = conditions.hide_in_width, color = {} },    spaces = {      function()        local label = "Spaces: " @@ -130,16 +131,16 @@ return {        end        return label .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " "      end, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,      color = {},    },    encoding = {      "o:encoding", -    upper = true, +    fmt = string.upper,      color = {}, -    condition = conditions.hide_in_width, +    cond = conditions.hide_in_width,    }, -  filetype = { "filetype", condition = conditions.hide_in_width, color = {} }, +  filetype = { "filetype", cond = conditions.hide_in_width, color = {} },    scrollbar = {      function()        local current_line = vim.fn.line "." @@ -149,9 +150,8 @@ return {        local index = math.ceil(line_ratio * #chars)        return chars[index]      end, -    left_padding = 0, -    right_padding = 0, +    padding = { left = 0, right = 0 },      color = { fg = colors.yellow, bg = colors.bg }, -    condition = nil, +    cond = nil,    },  } diff --git a/lua/core/lualine/styles.lua b/lua/core/lualine/styles.lua index 3595e5e3..19097424 100644 --- a/lua/core/lualine/styles.lua +++ b/lua/core/lualine/styles.lua @@ -11,8 +11,8 @@ styles.none = {    style = "none",    options = {      icons_enabled = true, -    component_separators = "", -    section_separators = "", +    component_separators = { left = "", right = "" }, +    section_separators = { left = "", right = "" },      disabled_filetypes = {},    },    sections = { @@ -39,8 +39,8 @@ styles.default = {    style = "default",    options = {      icons_enabled = true, -    component_separators = { "", "" }, -    section_separators = { "", "" }, +    component_separators = { left = "", right = "" }, +    section_separators = { left = "", right = "" },      disabled_filetypes = {},    },    sections = { @@ -67,8 +67,8 @@ styles.lvim = {    style = "lvim",    options = {      icons_enabled = true, -    component_separators = "", -    section_separators = "", +    component_separators = { left = "", right = "" }, +    section_separators = { left = "", right = "" },      disabled_filetypes = { "dashboard", "NvimTree", "Outline" },    },    sections = { | 
