diff options
author | Joe <rrbo@proton.me> | 2023-09-05 15:37:19 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2023-09-05 15:37:19 +0200 |
commit | e6826d78b4e83a96baafa2c95a41e9cc02fe2347 (patch) | |
tree | d24365ff3f44eee610f983622ef32677d136b71f /.config/nvim | |
parent | up (diff) | |
download | dotfiles-bsd-e6826d78b4e83a96baafa2c95a41e9cc02fe2347.tar.gz dotfiles-bsd-e6826d78b4e83a96baafa2c95a41e9cc02fe2347.tar.bz2 dotfiles-bsd-e6826d78b4e83a96baafa2c95a41e9cc02fe2347.tar.xz dotfiles-bsd-e6826d78b4e83a96baafa2c95a41e9cc02fe2347.tar.zst dotfiles-bsd-e6826d78b4e83a96baafa2c95a41e9cc02fe2347.zip |
upupuppu
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/plugs-config/lualine.lua | 72 |
1 files changed, 62 insertions, 10 deletions
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 }, } |