@@ -15,8 +15,10 @@ M.FLOAT_BORDER = "NeoTreeFloatBorder"
1515M .FLOAT_TITLE = " NeoTreeFloatTitle"
1616M .GIT_ADDED = " NeoTreeGitAdded"
1717M .GIT_CONFLICT = " NeoTreeGitConflict"
18+ M .GIT_DELETED = " NeoTreeGitDeleted"
1819M .GIT_IGNORED = " NeoTreeGitIgnored"
1920M .GIT_MODIFIED = " NeoTreeGitModified"
21+ M .GIT_RENAMED = " NeoTreeGitRenamed"
2022M .GIT_UNTRACKED = " NeoTreeGitUntracked"
2123M .HIDDEN_BY_NAME = " NeoTreeHiddenByName"
2224M .INDENT_MARKER = " NeoTreeIndentMarker"
4244-- is not defined and it is not linked to another group.
4345--- @param foreground string The foreground color to use , in hex , if the highlight group
4446-- is not defined and it is not linked to another group.
47+ --- @gui string The gui to use, if the highlight group is not defined and it is not linked
48+ -- to another group.
4549--- @return table table The highlight group values.
4650local function create_highlight_group (hl_group_name , link_to_if_exists , background , foreground , gui )
4751 local success , hl_group = pcall (vim .api .nvim_get_hl_by_name , hl_group_name , true )
@@ -101,23 +105,22 @@ M.setup = function()
101105 create_highlight_group (M .FLOAT_TITLE , {}, float_border_hl .background , normal_hl .foreground )
102106 create_highlight_group (M .TITLE_BAR , {}, float_border_hl .foreground , nil )
103107
104- create_highlight_group (M .GIT_ADDED , { " GitGutterAdd" , " GitSignsAdd" }, nil , " 5faf5f" )
105-
106- create_highlight_group (M .GIT_CONFLICT , { " GitGutterDelete" , " GitSignsDelete" }, nil , " ff5900" )
107-
108- local modified = create_highlight_group (
108+ local added = create_highlight_group (M .GIT_ADDED , { " GitGutterAdd" , " GitSignsAdd" }, nil , " 5faf5f" )
109+ create_highlight_group (M .GIT_DELETED , { " GitGutterDelete" , " GitSignsDelete" }, nil , " ff5900" )
110+ create_highlight_group (
109111 M .GIT_MODIFIED ,
110112 { " GitGutterChange" , " GitSignsChange" },
111113 nil ,
112114 " d7af5f"
113115 )
114-
115- create_highlight_group (M .GIT_UNTRACKED , {}, nil , modified .foreground , " italic" )
116+ local conflict = create_highlight_group (M .GIT_CONFLICT , {}, nil , " ff8700" , " italic,bold" )
117+ create_highlight_group (M .GIT_IGNORED , { M .DOTFILE }, nil , nil )
118+ create_highlight_group (M .GIT_RENAMED , { M .GIT_MODIFIED }, nil , nil )
119+ create_highlight_group (M .GIT_UNTRACKED , {}, nil , conflict .foreground , " italic" )
116120
117121 create_highlight_group (M .BUFFER_NUMBER , { " SpecialChar" })
118122 create_highlight_group (M .DIM_TEXT , {}, nil , " 505050" )
119123 create_highlight_group (M .DOTFILE , {}, nil , " 626262" )
120- create_highlight_group (M .GIT_IGNORED , { M .DOTFILE }, nil , nil )
121124 create_highlight_group (M .HIDDEN_BY_NAME , { M .DOTFILE }, nil , nil )
122125 create_highlight_group (M .CURSOR_LINE , { " CursorLine" }, nil , nil , " bold" )
123126 create_highlight_group (M .DIRECTORY_NAME , {}, " NONE" , " NONE" )
0 commit comments