From d35acd0125bd30bd19f6078730a79a23d5728502 Mon Sep 17 00:00:00 2001 From: doryan Date: Sun, 13 Apr 2025 00:20:34 +0400 Subject: [PATCH] feat(statusline): update statusline layout --- lua/config/plugins/lualine.lua | 125 ++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 57 deletions(-) diff --git a/lua/config/plugins/lualine.lua b/lua/config/plugins/lualine.lua index b2b1072..3f43dfb 100644 --- a/lua/config/plugins/lualine.lua +++ b/lua/config/plugins/lualine.lua @@ -1,59 +1,70 @@ +local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" } + + + require("lualine").setup({ - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - always_show_tabline = true, - globalstatus = true, - refresh = { - statusline = 100, - tabline = 100, - winbar = 100, - } - }, - sections = { - lualine_a = { - { - function() - return "  " - end, - padding = { left = 0, right = 0 }, - color = {}, - cond = nil, - }, - }, - lualine_b = {'branch'}, - lualine_c = {'diff'}, - lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = { - { - function() - return "  " - end, - padding = { left = 0, right = 0 }, - color = {}, - cond = nil, - }, - }, - lualine_b = {'branch'}, - lualine_c = {'diff'}, - lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + always_show_tabline = true, + globalstatus = true, + refresh = { + statusline = 100, + tabline = 100, + winbar = 100, + } + }, + sections = { + lualine_a = { + { + function() + return "  " + end, + padding = { left = 0, right = 0 }, + color = {}, + cond = nil, + }, + }, + lualine_b = { 'branch' }, + lualine_c = { + { + 'diff', + colored = true, -- Displays a colored diff status if set to true + symbols = { added = ' ', modified = ' ', removed = ' ' }, -- Changes the symbols used by the diff. + source = nil, -- A function that works as a data source for diff. + } + }, + lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = { + { + function() + return "  " + end, + padding = { left = 0, right = 0 }, + color = {}, + cond = nil, + }, + }, + lualine_b = { 'branch' }, + lualine_c = {}, + lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} })