From aa8198cb390958820286f69d0901a4c931b37bf0 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 1 Mar 2023 16:56:51 +0300 Subject: [PATCH] feat: add diff component to lualine --- modules/statusline/lualine/lualine.nix | 38 +++++++++++++++++++------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/modules/statusline/lualine/lualine.nix b/modules/statusline/lualine/lualine.nix index a6599bb..499b779 100644 --- a/modules/statusline/lualine/lualine.nix +++ b/modules/statusline/lualine/lualine.nix @@ -142,6 +142,13 @@ in { description = "active config for: | A | (B) | C X | Y | Z |"; default = '' { + { + "filetype", + colored = true, + icon_only = true, + icon = { align = 'left' }, + color = {bg='none', fg='lavender'}, + }, { "filename", color = {bg='none'}, @@ -157,12 +164,19 @@ in { default = '' { { - "branch", - icon = ' •', - separator = { - left = '(', - right = ')' - } + "diff", + colored = false, + diff_color = { + -- Same color values as the general color option can be used here. + added = 'DiffAdd', -- Changes the diff's added color + modified = 'DiffChange', -- Changes the diff's modified color + removed = 'DiffDelete', -- Changes the diff's removed color you + }, + symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the diff symbols + color = { + bg='none', + fg='lavender' + }, }, } ''; @@ -176,7 +190,7 @@ in { { "diagnostics", sources = {'nvim_lsp', 'nvim_diagnostic', 'coc'}, - symbols = {error = '', warn = '', info = '', hint = ''} + symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} }, } ''; @@ -214,10 +228,14 @@ in { color = {bg='none', fg='lavender'}, }, { - "filetype", - colored = true, - icon = { align = 'right' }, + "branch", + icon = ' •', + separator = { + left = '(', + right = ')' + }, color = {bg='none', fg='lavender'}, + }, } '';