✨ feat(ui/lualine): create custom theme based on chadwal colors (onedark style) with improved configuration

This commit is contained in:
sankalp committed 2025-07-11 10:49:15 +05:45
1 parent 17384b97bb
commit 5f1e8927db
1 file changed
+35 -61
+35 -61
View File
@@ -157,75 +157,49 @@ local function mode(icon)
} }
end end
-- Modify the onedark theme to use chadwal colors -- Create a custom theme based on chadwal colors (onedark style)
local custom_theme = require('lualine.themes.onedark') local custom_theme = {
normal = {
-- Update normal mode a = { fg = colors.black, bg = colors.green, gui = 'bold' },
custom_theme.normal.a.fg = colors.black b = { fg = colors.white, bg = colors.one_bg },
custom_theme.normal.a.bg = colors.green c = { fg = colors.light_grey, bg = 'NONE' },
custom_theme.normal.b.fg = colors.white },
custom_theme.normal.b.bg = colors.one_bg2 insert = {
custom_theme.normal.c.fg = colors.white a = { fg = colors.black, bg = colors.blue, gui = 'bold' },
custom_theme.normal.c.bg = colors.black b = { fg = colors.white, bg = colors.one_bg },
c = { fg = colors.light_grey, bg = 'NONE' },
-- Update insert mode },
custom_theme.insert.a.fg = colors.black visual = {
custom_theme.insert.a.bg = colors.blue a = { fg = colors.black, bg = colors.pink, gui = 'bold' },
custom_theme.insert.b.fg = colors.white b = { fg = colors.white, bg = colors.one_bg },
custom_theme.insert.b.bg = colors.one_bg2 c = { fg = colors.light_grey, bg = 'NONE' },
custom_theme.insert.c.fg = colors.white },
custom_theme.insert.c.bg = colors.black replace = {
a = { fg = colors.black, bg = colors.red, gui = 'bold' },
-- Update visual mode b = { fg = colors.white, bg = colors.one_bg },
custom_theme.visual.a.fg = colors.black c = { fg = colors.light_grey, bg = 'NONE' },
custom_theme.visual.a.bg = colors.pink },
custom_theme.visual.b.fg = colors.white command = {
custom_theme.visual.b.bg = colors.one_bg2 a = { fg = colors.black, bg = colors.yellow, gui = 'bold' },
custom_theme.visual.c.fg = colors.white b = { fg = colors.white, bg = colors.one_bg },
custom_theme.visual.c.bg = colors.black c = { fg = colors.light_grey, bg = 'NONE' },
},
-- Update replace mode inactive = {
custom_theme.replace.a.fg = colors.black a = { fg = colors.grey, bg = 'NONE' },
custom_theme.replace.a.bg = colors.red b = { fg = colors.grey, bg = 'NONE' },
custom_theme.replace.b.fg = colors.white c = { fg = colors.grey, bg = 'NONE' },
custom_theme.replace.b.bg = colors.one_bg2 },
custom_theme.replace.c.fg = colors.white }
custom_theme.replace.c.bg = colors.black
-- Update command mode
custom_theme.command.a.fg = colors.black
custom_theme.command.a.bg = colors.yellow
custom_theme.command.b.fg = colors.white
custom_theme.command.b.bg = colors.one_bg2
custom_theme.command.c.fg = colors.white
custom_theme.command.c.bg = colors.black
-- Update inactive mode
custom_theme.inactive.a.fg = colors.grey
custom_theme.inactive.a.bg = colors.black
custom_theme.inactive.b.fg = colors.grey
custom_theme.inactive.b.bg = colors.black
custom_theme.inactive.c.fg = colors.grey
custom_theme.inactive.c.bg = colors.black
-- Update tabline to match theme
if custom_theme.tabline then
custom_theme.tabline.a.fg = colors.white
custom_theme.tabline.a.bg = colors.one_bg2
custom_theme.tabline.b.fg = colors.white
custom_theme.tabline.b.bg = colors.black
custom_theme.tabline.c.fg = colors.grey
custom_theme.tabline.c.bg = colors.black
end
lualine.setup({ lualine.setup({
options = { options = {
component_separators = '', component_separators = '',
-- section_separators = '', section_separators = { left = '', right = '' },
theme = custom_theme, theme = custom_theme,
disabled_filetypes = { disabled_filetypes = {
'dashboard', 'dashboard',
}, },
globalstatus = true,
}, },
-- extensions = { 'quickfix', 'man', 'mason', 'lazy', 'toggleterm', 'nvim-tree' }, -- extensions = { 'quickfix', 'man', 'mason', 'lazy', 'toggleterm', 'nvim-tree' },
tabline = { tabline = {