@@ -4,62 +4,64 @@ local utils = require "nvim-tree.utils"
4
4
local M = {}
5
5
6
6
local function build_icons_table ()
7
+ local i = M .icon_state .icons .git_icons
7
8
return {
8
- [" M " ] = { { icon = M .icon_state .icons .git_icons .staged , hl = " NvimTreeGitStaged" } },
9
- [" M" ] = { { icon = M .icon_state .icons .git_icons .unstaged , hl = " NvimTreeGitDirty" } },
10
- [" C " ] = { { icon = M .icon_state .icons .git_icons .staged , hl = " NvimTreeGitStaged" } },
11
- [" C" ] = { { icon = M .icon_state .icons .git_icons .unstaged , hl = " NvimTreeGitDirty" } },
12
- [" CM" ] = { { icon = M .icon_state .icons .git_icons .unstaged , hl = " NvimTreeGitDirty" } },
13
- [" T" ] = { { icon = M .icon_state .icons .git_icons .unstaged , hl = " NvimTreeGitDirty" } },
9
+ [" M " ] = { { icon = i .staged , hl = " NvimTreeGitStaged" } },
10
+ [" M" ] = { { icon = i .unstaged , hl = " NvimTreeGitDirty" } },
11
+ [" C " ] = { { icon = i .staged , hl = " NvimTreeGitStaged" } },
12
+ [" C" ] = { { icon = i .unstaged , hl = " NvimTreeGitDirty" } },
13
+ [" CM" ] = { { icon = i .unstaged , hl = " NvimTreeGitDirty" } },
14
+ [" T" ] = { { icon = i .unstaged , hl = " NvimTreeGitDirty" } },
15
+ [" T " ] = { { icon = i .staged , hl = " NvimTreeGitStaged" } },
14
16
[" MM" ] = {
15
- { icon = M . icon_state . icons . git_icons .staged , hl = " NvimTreeGitStaged" },
16
- { icon = M . icon_state . icons . git_icons .unstaged , hl = " NvimTreeGitDirty" },
17
+ { icon = i .staged , hl = " NvimTreeGitStaged" },
18
+ { icon = i .unstaged , hl = " NvimTreeGitDirty" },
17
19
},
18
20
[" MD" ] = {
19
- { icon = M . icon_state . icons . git_icons .staged , hl = " NvimTreeGitStaged" },
21
+ { icon = i .staged , hl = " NvimTreeGitStaged" },
20
22
},
21
23
[" A " ] = {
22
- { icon = M . icon_state . icons . git_icons .staged , hl = " NvimTreeGitStaged" },
24
+ { icon = i .staged , hl = " NvimTreeGitStaged" },
23
25
},
24
26
[" AD" ] = {
25
- { icon = M . icon_state . icons . git_icons .staged , hl = " NvimTreeGitStaged" },
27
+ { icon = i .staged , hl = " NvimTreeGitStaged" },
26
28
},
27
29
[" A" ] = {
28
- { icon = M . icon_state . icons . git_icons .untracked , hl = " NvimTreeGitNew" },
30
+ { icon = i .untracked , hl = " NvimTreeGitNew" },
29
31
},
30
32
-- not sure about this one
31
33
[" AA" ] = {
32
- { icon = M . icon_state . icons . git_icons .unmerged , hl = " NvimTreeGitMerge" },
33
- { icon = M . icon_state . icons . git_icons .untracked , hl = " NvimTreeGitNew" },
34
+ { icon = i .unmerged , hl = " NvimTreeGitMerge" },
35
+ { icon = i .untracked , hl = " NvimTreeGitNew" },
34
36
},
35
37
[" AU" ] = {
36
- { icon = M . icon_state . icons . git_icons .unmerged , hl = " NvimTreeGitMerge" },
37
- { icon = M . icon_state . icons . git_icons .untracked , hl = " NvimTreeGitNew" },
38
+ { icon = i .unmerged , hl = " NvimTreeGitMerge" },
39
+ { icon = i .untracked , hl = " NvimTreeGitNew" },
38
40
},
39
41
[" AM" ] = {
40
- { icon = M . icon_state . icons . git_icons .staged , hl = " NvimTreeGitStaged" },
41
- { icon = M . icon_state . icons . git_icons .unstaged , hl = " NvimTreeGitDirty" },
42
+ { icon = i .staged , hl = " NvimTreeGitStaged" },
43
+ { icon = i .unstaged , hl = " NvimTreeGitDirty" },
42
44
},
43
- [" ??" ] = { { icon = M . icon_state . icons . git_icons .untracked , hl = " NvimTreeGitNew" } },
44
- [" R " ] = { { icon = M . icon_state . icons . git_icons .renamed , hl = " NvimTreeGitRenamed" } },
45
- [" R" ] = { { icon = M . icon_state . icons . git_icons .renamed , hl = " NvimTreeGitRenamed" } },
45
+ [" ??" ] = { { icon = i .untracked , hl = " NvimTreeGitNew" } },
46
+ [" R " ] = { { icon = i .renamed , hl = " NvimTreeGitRenamed" } },
47
+ [" R" ] = { { icon = i .renamed , hl = " NvimTreeGitRenamed" } },
46
48
[" RM" ] = {
47
- { icon = M . icon_state . icons . git_icons .unstaged , hl = " NvimTreeGitDirty" },
48
- { icon = M . icon_state . icons . git_icons .renamed , hl = " NvimTreeGitRenamed" },
49
+ { icon = i .unstaged , hl = " NvimTreeGitDirty" },
50
+ { icon = i .renamed , hl = " NvimTreeGitRenamed" },
49
51
},
50
- [" UU" ] = { { icon = M . icon_state . icons . git_icons .unmerged , hl = " NvimTreeGitMerge" } },
51
- [" UD" ] = { { icon = M . icon_state . icons . git_icons .unmerged , hl = " NvimTreeGitMerge" } },
52
- [" UA" ] = { { icon = M . icon_state . icons . git_icons .unmerged , hl = " NvimTreeGitMerge" } },
53
- [" D" ] = { { icon = M . icon_state . icons . git_icons .deleted , hl = " NvimTreeGitDeleted" } },
54
- [" D " ] = { { icon = M . icon_state . icons . git_icons .deleted , hl = " NvimTreeGitDeleted" } },
55
- [" RD" ] = { { icon = M . icon_state . icons . git_icons .deleted , hl = " NvimTreeGitDeleted" } },
56
- [" DD" ] = { { icon = M . icon_state . icons . git_icons .deleted , hl = " NvimTreeGitDeleted" } },
52
+ [" UU" ] = { { icon = i .unmerged , hl = " NvimTreeGitMerge" } },
53
+ [" UD" ] = { { icon = i .unmerged , hl = " NvimTreeGitMerge" } },
54
+ [" UA" ] = { { icon = i .unmerged , hl = " NvimTreeGitMerge" } },
55
+ [" D" ] = { { icon = i .deleted , hl = " NvimTreeGitDeleted" } },
56
+ [" D " ] = { { icon = i .deleted , hl = " NvimTreeGitDeleted" } },
57
+ [" RD" ] = { { icon = i .deleted , hl = " NvimTreeGitDeleted" } },
58
+ [" DD" ] = { { icon = i .deleted , hl = " NvimTreeGitDeleted" } },
57
59
[" DU" ] = {
58
- { icon = M . icon_state . icons . git_icons .deleted , hl = " NvimTreeGitDeleted" },
59
- { icon = M . icon_state . icons . git_icons .unmerged , hl = " NvimTreeGitMerge" },
60
+ { icon = i .deleted , hl = " NvimTreeGitDeleted" },
61
+ { icon = i .unmerged , hl = " NvimTreeGitMerge" },
60
62
},
61
- [" !!" ] = { { icon = M . icon_state . icons . git_icons .ignored , hl = " NvimTreeGitIgnored" } },
62
- dirty = { { icon = M . icon_state . icons . git_icons .unstaged , hl = " NvimTreeGitDirty" } },
63
+ [" !!" ] = { { icon = i .ignored , hl = " NvimTreeGitIgnored" } },
64
+ dirty = { { icon = i .unstaged , hl = " NvimTreeGitDirty" } },
63
65
}
64
66
end
65
67
@@ -106,6 +108,7 @@ local git_hl = {
106
108
[" AA" ] = " NvimTreeFileStaged" ,
107
109
[" AD" ] = " NvimTreeFileStaged" ,
108
110
[" MD" ] = " NvimTreeFileStaged" ,
111
+ [" T " ] = " NvimTreeFileStaged" ,
109
112
[" M" ] = " NvimTreeFileDirty" ,
110
113
[" CM" ] = " NvimTreeFileDirty" ,
111
114
[" C" ] = " NvimTreeFileDirty" ,
0 commit comments