summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/plugins/lualine.lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-07-08 15:44:17 -0400
committertriethyl <triethylammonium@pm.me>2025-07-08 15:44:17 -0400
commita544c622d31187f245b34b9b8b17cbb63a941480 (patch)
tree5f5f22c3ba814a6880d0849a7076aba10eb99b5e /pkgs/custom-neovim/config/lua/plugins/lualine.lua
parent6646af18a28b5f2ecc56a7d6364b9ca6cb401b8f (diff)
configured lualine and tabby
Former-commit-id: 947770af8ae586dfc89c0d498a766c7aaa802dd2
Diffstat (limited to 'pkgs/custom-neovim/config/lua/plugins/lualine.lua')
-rw-r--r--pkgs/custom-neovim/config/lua/plugins/lualine.lua154
1 files changed, 72 insertions, 82 deletions
diff --git a/pkgs/custom-neovim/config/lua/plugins/lualine.lua b/pkgs/custom-neovim/config/lua/plugins/lualine.lua
index 409c452..b38d3ed 100644
--- a/pkgs/custom-neovim/config/lua/plugins/lualine.lua
+++ b/pkgs/custom-neovim/config/lua/plugins/lualine.lua
@@ -1,98 +1,88 @@
-local auto_theme = require("lualine.themes.auto")
-
-local colors = {
- modes = {
- normal = auto_theme.normal.a.bg,
- insert = auto_theme.insert.a.bg,
- visual = auto_theme.visual.a.bg,
- replace = auto_theme.replace.a.bg,
- command = auto_theme.command.a.bg,
- inactive = auto_theme.inactive.a.bg,
- },
- text = {
- dark = auto_theme.normal.a.fg,
- light = auto_theme.normal.c.fg,
- },
- backdrop = auto_theme.normal.c.bg,
-}
-
-local custom_auto_theme = {
- normal = {
- a = {bg = colors.modes.normal, fg = colors.text.dark, gui = 'bold'},
- b = {bg = colors.backdrop, fg = colors.text.light},
- c = {bg = colors.backdrop, fg = colors.text.light},
- x = {bg = colors.backdrop, fg = colors.text.light},
- y = {bg = colors.backdrop, fg = colors.text.light},
- z = {bg = colors.modes.normal, fg = colors.text.dark, gui = 'bold'},
- },
- insert = {
- a = {bg = colors.modes.insert, fg = colors.text.dark, gui = 'bold'},
- b = {bg = colors.backdrop, fg = colors.text.light},
- c = {bg = colors.backdrop, fg = colors.text.light},
- x = {bg = colors.backdrop, fg = colors.text.light},
- y = {bg = colors.backdrop, fg = colors.text.light},
- z = {bg = colors.modes.insert, fg = colors.text.dark, gui = 'bold'},
- },
- visual = {
- a = {bg = colors.modes.visual, fg = colors.text.dark, gui = 'bold'},
- b = {bg = colors.backdrop, fg = colors.text.light},
- c = {bg = colors.backdrop, fg = colors.text.light},
- x = {bg = colors.backdrop, fg = colors.text.light},
- y = {bg = colors.backdrop, fg = colors.text.light},
- z = {bg = colors.modes.visual, fg = colors.text.dark, gui = 'bold'},
- },
- replace = {
- a = {bg = colors.modes.replace, fg = colors.text.dark, gui = 'bold'},
- b = {bg = colors.backdrop, fg = colors.text.light},
- c = {bg = colors.backdrop, fg = colors.text.light},
- x = {bg = colors.backdrop, fg = colors.text.light},
- y = {bg = colors.backdrop, fg = colors.text.light},
- z = {bg = colors.modes.replace, fg = colors.text.dark, gui = 'bold'},
- },
- command = {
- a = {bg = colors.modes.command, fg = colors.text.dark, gui = 'bold'},
- b = {bg = colors.backdrop, fg = colors.text.light},
- c = {bg = colors.backdrop, fg = colors.text.light},
- x = {bg = colors.backdrop, fg = colors.text.light},
- y = {bg = colors.backdrop, fg = colors.text.light},
- z = {bg = colors.modes.command, fg = colors.text.dark, gui = 'bold'},
- },
- inactive = {
- a = {bg = colors.modes.inactive, fg = colors.text.dark, gui = 'bold'},
- b = {bg = colors.backdrop, fg = colors.text.light},
- c = {bg = colors.backdrop, fg = colors.text.light},
- x = {bg = colors.backdrop, fg = colors.text.light},
- y = {bg = colors.backdrop, fg = colors.text.light},
- z = {bg = colors.modes.inactive, fg = colors.text.dark, gui = 'bold'},
- },
-};
+local generate_lualine_theme = function()
+ local colors = utils.generate_theme_from_lualine()
+ return {
+ normal = {
+ a = {bg = colors.modes.normal, fg = colors.text.dark, gui = 'bold'},
+ b = {bg = colors.background, fg = colors.text.light},
+ c = {bg = colors.background, fg = colors.text.light},
+ x = {bg = colors.background, fg = colors.text.light},
+ y = {bg = colors.background, fg = colors.text.light},
+ z = {bg = colors.modes.normal, fg = colors.text.dark, gui = 'bold'},
+ },
+ insert = {
+ a = {bg = colors.modes.insert, fg = colors.text.dark, gui = 'bold'},
+ b = {bg = colors.background, fg = colors.text.light},
+ c = {bg = colors.background, fg = colors.text.light},
+ x = {bg = colors.background, fg = colors.text.light},
+ y = {bg = colors.background, fg = colors.text.light},
+ z = {bg = colors.modes.insert, fg = colors.text.dark, gui = 'bold'},
+ },
+ visual = {
+ a = {bg = colors.modes.visual, fg = colors.text.dark, gui = 'bold'},
+ b = {bg = colors.background, fg = colors.text.light},
+ c = {bg = colors.background, fg = colors.text.light},
+ x = {bg = colors.background, fg = colors.text.light},
+ y = {bg = colors.background, fg = colors.text.light},
+ z = {bg = colors.modes.visual, fg = colors.text.dark, gui = 'bold'},
+ },
+ replace = {
+ a = {bg = colors.modes.replace, fg = colors.text.dark, gui = 'bold'},
+ b = {bg = colors.background, fg = colors.text.light},
+ c = {bg = colors.background, fg = colors.text.light},
+ x = {bg = colors.background, fg = colors.text.light},
+ y = {bg = colors.background, fg = colors.text.light},
+ z = {bg = colors.modes.replace, fg = colors.text.dark, gui = 'bold'},
+ },
+ command = {
+ a = {bg = colors.modes.command, fg = colors.text.dark, gui = 'bold'},
+ b = {bg = colors.background, fg = colors.text.light},
+ c = {bg = colors.background, fg = colors.text.light},
+ x = {bg = colors.background, fg = colors.text.light},
+ y = {bg = colors.background, fg = colors.text.light},
+ z = {bg = colors.modes.command, fg = colors.text.dark, gui = 'bold'},
+ },
+ inactive = {
+ a = {bg = colors.modes.inactive, fg = colors.text.dark, gui = 'bold'},
+ b = {bg = colors.background, fg = colors.text.light},
+ c = {bg = colors.background, fg = colors.text.light},
+ x = {bg = colors.background, fg = colors.text.light},
+ y = {bg = colors.background, fg = colors.text.light},
+ z = {bg = colors.modes.inactive, fg = colors.text.dark, gui = 'bold'},
+ },
+ };
+end
require('lualine').setup {
options = {
- theme = custom_auto_theme,
+ theme = generate_lualine_theme(),
component_separators = "",
- section_separators = { left = '', right = '' },
+ section_separators = { left = '', right = '' },
},
sections = {
- lualine_a = { { 'mode', separator = { left = '', rignt = '' }, right_padding = 2 } },
- lualine_b = { 'filename', 'branch' },
- lualine_c = {
- '%=', --[[ add your center components here in place of this comment ]]
- },
- lualine_x = {},
- lualine_y = { 'filetype', 'progress' },
+ lualine_a = { { 'mode', separator = { left = '', rignt = '' }, right_padding = 2 } }, -- { left = '', rignt = '' }
+ lualine_b = { 'filename', 'diff' },
+ lualine_c = { 'branch' },
+ lualine_x = { {'diagnostics', sources = { 'nvim_lsp' } } },
+ lualine_y = { 'lsp_status', 'progress' },
lualine_z = {
- { 'location', separator = { left = '', right = '' }, left_padding = 2 },
+ { 'location', separator = { left = '', right = '' }, left_padding = 2 },
},
},
inactive_sections = {
- lualine_a = { 'filename' },
- lualine_b = {},
+ lualine_a = {},
+ lualine_b = { 'filename' },
lualine_c = {},
lualine_x = {},
- lualine_y = {},
- lualine_z = { 'location' },
+ lualine_y = { 'location' },
+ lualine_z = {},
},
tabline = {},
extensions = {},
}
+
+-- vim.api.nvim_create_autocmd("ColorScheme", {
+-- callback = function()
+-- setup_lualine()
+-- print "colorscheme changed"
+-- end,
+-- })