sorted icons
This commit is contained in:
@@ -7,13 +7,13 @@ local M = {
|
|||||||
|
|
||||||
local function build_icons_table(i)
|
local function build_icons_table(i)
|
||||||
local icons = {
|
local icons = {
|
||||||
staged = { icon = i.staged, hl = "NvimTreeGitStaged" },
|
staged = { icon = i.staged, hl = "NvimTreeGitStaged", ord = 1 },
|
||||||
unstaged = { icon = i.unstaged, hl = "NvimTreeGitDirty" },
|
unstaged = { icon = i.unstaged, hl = "NvimTreeGitDirty", ord = 2 },
|
||||||
untracked = { icon = i.untracked, hl = "NvimTreeGitNew" },
|
renamed = { icon = i.renamed, hl = "NvimTreeGitRenamed", ord = 3 },
|
||||||
unmerged = { icon = i.unmerged, hl = "NvimTreeGitMerge" },
|
deleted = { icon = i.deleted, hl = "NvimTreeGitDeleted", ord = 4 },
|
||||||
renamed = { icon = i.renamed, hl = "NvimTreeGitRenamed" },
|
unmerged = { icon = i.unmerged, hl = "NvimTreeGitMerge", ord = 5 },
|
||||||
deleted = { icon = i.deleted, hl = "NvimTreeGitDeleted" },
|
untracked = { icon = i.untracked, hl = "NvimTreeGitNew", ord = 6 },
|
||||||
ignored = { icon = i.ignored, hl = "NvimTreeGitIgnored" },
|
ignored = { icon = i.ignored, hl = "NvimTreeGitIgnored", ord = 7 },
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
["M "] = { icons.staged },
|
["M "] = { icons.staged },
|
||||||
@@ -85,6 +85,8 @@ local function get_icons_(node)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
table.sort(iconss, function(a, b) return a.ord < b.ord end)
|
||||||
|
|
||||||
return iconss
|
return iconss
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user