summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/core/lualine/components.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-17 18:02:12 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-17 18:02:12 +0200
commitc587d8d0efaa9ac830a022cb197b50563da846bb (patch)
tree26ce5137b6ce7e6d2f6673b94b40844a514400cc /.config/nvim/lua/core/lualine/components.lua
parent4c1f9abc73b7d6aaa578d0a6637cd83c5ab951d3 (diff)
Bug fix for breaking changes in lualine
Diffstat (limited to '.config/nvim/lua/core/lualine/components.lua')
-rw-r--r--.config/nvim/lua/core/lualine/components.lua52
1 files changed, 22 insertions, 30 deletions
diff --git a/.config/nvim/lua/core/lualine/components.lua b/.config/nvim/lua/core/lualine/components.lua
index 6af34fa..78f1793 100644
--- a/.config/nvim/lua/core/lualine/components.lua
+++ b/.config/nvim/lua/core/lualine/components.lua
@@ -31,31 +31,32 @@ return {
return alias_mode .. " "
-- return " "
end,
- left_padding = 0,
- right_padding = 0,
- condition = nil,
+ padding = { left = 0, right = 0 },
+ cond = nil,
color = { fg = colors.fg, bg = colors.bg },
},
branch = {
"b:gitsigns_head",
icon = " ",
color = { gui = "bold", fg = colors.fg, bg = colors.bg },
- condition = conditions.hide_in_width,
+ cond = conditions.hide_in_width,
},
filename = {
"filename",
color = { fg = colors.fg, bg = colors.bg },
- 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()
@@ -74,14 +75,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()
@@ -92,7 +93,7 @@ return {
return ""
end,
color = { fg = colors.green },
- condition = conditions.hide_in_width,
+ cond = conditions.hide_in_width,
},
lsp = {
function(msg)
@@ -131,18 +132,10 @@ return {
end,
icon = " ",
color = { fg = colors.fg, bg = colors.bg },
- condition = conditions.hide_in_width,
- },
- location = {
- "location",
- color = { fg = colors.fg, bg = colors.bg },
- condition = conditions.hide_in_width,
- },
- progress = {
- "progress",
- color = { fg = colors.fg, bg = colors.bg },
- condition = conditions.hide_in_width,
+ cond = conditions.hide_in_width,
},
+ location = { "location", cond = conditions.hide_in_width, color = {} },
+ progress = { "progress", cond = conditions.hide_in_width, color = {} },
spaces = {
function()
local label = "Spaces: "
@@ -152,15 +145,15 @@ return {
return label .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " "
end,
color = {},
- condition = conditions.hide_in_width,
+ cond = conditions.hide_in_width,
},
encoding = {
"o:encoding",
- upper = true,
+ fmt = string.upper,
color = { fg = colors.fg, bg = colors.bg },
- 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 "."
@@ -180,9 +173,8 @@ return {
local index = math.ceil(line_ratio * #chars)
return chars[index]
end,
- left_padding = 0,
- right_padding = 0,
- condition = nil,
+ padding = { left = 0, right = 0 },
+ cond = nil,
color = { fg = colors.yellow, bg = colors.bg },
},
}