chore: format

This commit is contained in:
kiyan
2022-03-09 21:33:20 +01:00
parent 144bce74a5
commit d2b12d6055
2 changed files with 22 additions and 21 deletions

View File

@@ -12,40 +12,40 @@ local function build_icons_table()
["CM"] = { { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } }, ["CM"] = { { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } },
[" T"] = { { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } }, [" T"] = { { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } },
["MM"] = { ["MM"] = {
{ icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" }, { icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" },
{ icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" }, { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" },
}, },
["MD"] = { ["MD"] = {
{ icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" }, { icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" },
}, },
["A "] = { ["A "] = {
{ icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" }, { icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" },
}, },
["AD"] = { ["AD"] = {
{ icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" }, { icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" },
}, },
[" A"] = { [" A"] = {
{ icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" }, { icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" },
}, },
-- not sure about this one -- not sure about this one
["AA"] = { ["AA"] = {
{ icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" }, { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" },
{ icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" }, { icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" },
}, },
["AU"] = { ["AU"] = {
{ icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" }, { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" },
{ icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" }, { icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" },
}, },
["AM"] = { ["AM"] = {
{ icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" }, { icon = M.icon_state.icons.git_icons.staged, hl = "NvimTreeGitStaged" },
{ icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" }, { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" },
}, },
["??"] = { { icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" } }, ["??"] = { { icon = M.icon_state.icons.git_icons.untracked, hl = "NvimTreeGitNew" } },
["R "] = { { icon = M.icon_state.icons.git_icons.renamed, hl = "NvimTreeGitRenamed" } }, ["R "] = { { icon = M.icon_state.icons.git_icons.renamed, hl = "NvimTreeGitRenamed" } },
[" R"] = { { icon = M.icon_state.icons.git_icons.renamed, hl = "NvimTreeGitRenamed" } }, [" R"] = { { icon = M.icon_state.icons.git_icons.renamed, hl = "NvimTreeGitRenamed" } },
["RM"] = { ["RM"] = {
{ icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" }, { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" },
{ icon = M.icon_state.icons.git_icons.renamed, hl = "NvimTreeGitRenamed" }, { icon = M.icon_state.icons.git_icons.renamed, hl = "NvimTreeGitRenamed" },
}, },
["UU"] = { { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" } }, ["UU"] = { { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" } },
["UD"] = { { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" } }, ["UD"] = { { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" } },
@@ -55,22 +55,24 @@ local function build_icons_table()
["RD"] = { { icon = M.icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" } }, ["RD"] = { { icon = M.icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" } },
["DD"] = { { icon = M.icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" } }, ["DD"] = { { icon = M.icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" } },
["DU"] = { ["DU"] = {
{ icon = M.icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" }, { icon = M.icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" },
{ icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" }, { icon = M.icon_state.icons.git_icons.unmerged, hl = "NvimTreeGitMerge" },
}, },
["!!"] = { { icon = M.icon_state.icons.git_icons.ignored, hl = "NvimTreeGitIgnored" } }, ["!!"] = { { icon = M.icon_state.icons.git_icons.ignored, hl = "NvimTreeGitIgnored" } },
dirty = { { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } }, dirty = { { icon = M.icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } },
} }
end end
local function empty() return "" end local function empty()
return ""
end
local function nil_() end local function nil_() end
local function warn_status(git_status) local function warn_status(git_status)
utils.warn( utils.warn(
'Unrecognized git state "' 'Unrecognized git state "'
.. git_status .. git_status
.. '". Please open up an issue on https://github.com/kyazdani42/nvim-tree.lua/issues with this message.' .. '". Please open up an issue on https://github.com/kyazdani42/nvim-tree.lua/issues with this message.'
) )
end end
@@ -110,7 +112,7 @@ local git_hl = {
[" T"] = "NvimTreeFileDirty", [" T"] = "NvimTreeFileDirty",
["MM"] = "NvimTreeFileDirty", ["MM"] = "NvimTreeFileDirty",
["AM"] = "NvimTreeFileDirty", ["AM"] = "NvimTreeFileDirty",
dirty = "NvimTreeFileDirty", dirty = "NvimTreeFileDirty",
["A "] = "NvimTreeFileNew", ["A "] = "NvimTreeFileNew",
["??"] = "NvimTreeFileNew", ["??"] = "NvimTreeFileNew",
["AU"] = "NvimTreeFileMerge", ["AU"] = "NvimTreeFileMerge",

View File

@@ -105,7 +105,6 @@ if icon_state.show_file_icon then
end end
end end
local picture = { local picture = {
jpg = true, jpg = true,
jpeg = true, jpeg = true,