From e6826d78b4e83a96baafa2c95a41e9cc02fe2347 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 5 Sep 2023 15:37:19 +0200 Subject: upupuppu --- .config/nvim/lua/plugs-config/lualine.lua | 72 ++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 10 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/plugs-config/lualine.lua b/.config/nvim/lua/plugs-config/lualine.lua index 9f706f2..3ea3a87 100644 --- a/.config/nvim/lua/plugs-config/lualine.lua +++ b/.config/nvim/lua/plugs-config/lualine.lua @@ -82,30 +82,56 @@ ins_left { function() return '▊' end, - color = { fg = colors.red }, -- Sets highlighting of component + -- color = { fg = colors.green }, -- Sets highlighting of component + color = function() + -- auto change color according to neovims mode + local mode_color = { + n = colors.green, + i = colors.blue, + v = colors.magenta, + [''] = colors.magenta, + V = colors.magenta, + c = colors.yellow, + no = colors.red, + s = colors.orange, + S = colors.orange, + [''] = colors.orange, + ic = colors.yellow, + R = colors.red, + Rv = colors.violet, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ['r?'] = colors.cyan, + ['!'] = colors.red, + t = colors.red, + } + return { fg = mode_color[vim.fn.mode()] } + end, padding = { left = 0, right = 1 }, -- We don't need space before this } ins_left { -- mode component function() - return '󱓞' + return '' end, color = function() -- auto change color according to neovims mode local mode_color = { - n = colors.red, - i = colors.green, - v = colors.blue, - [''] = colors.blue, - V = colors.blue, - c = colors.magenta, + n = colors.green, + i = colors.blue, + v = colors.magenta, + [''] = colors.magenta, + V = colors.magenta, + c = colors.yellow, no = colors.red, s = colors.orange, S = colors.orange, [''] = colors.orange, ic = colors.yellow, - R = colors.violet, + R = colors.red, Rv = colors.violet, cv = colors.red, ce = colors.red, @@ -213,7 +239,33 @@ ins_right { function() return '▊' end, - color = { fg = colors.blue }, + -- color = { fg = colors.green }, + color = function() + -- auto change color according to neovims mode + local mode_color = { + n = colors.green, + i = colors.blue, + v = colors.magenta, + [''] = colors.magenta, + V = colors.magenta, + c = colors.yellow, + no = colors.red, + s = colors.orange, + S = colors.orange, + [''] = colors.orange, + ic = colors.yellow, + R = colors.red, + Rv = colors.violet, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ['r?'] = colors.cyan, + ['!'] = colors.red, + t = colors.red, + } + return { fg = mode_color[vim.fn.mode()] } + end, padding = { left = 1 }, } -- cgit v1.2.3