feat: Highlight gitignored files (and fix g:nvim_tree_gitignore) (#268)

This commit is contained in:
Sindre T. Strøm
2021-04-08 22:52:56 +02:00
committed by GitHub
parent 81269a6eba
commit 50d31fb7f3
8 changed files with 224 additions and 52 deletions

View File

@@ -115,6 +115,7 @@ if vim.g.nvim_tree_git_hl == 1 then
[" A"] = { { hl = "none" } },
["RM"] = { { hl = "NvimTreeFileRenamed" } },
dirty = { { hl = "NvimTreeFileDirty" } },
ignored = { { hl = "NvimTreeGitIgnored" } },
}
get_git_hl = function(node)
local git_status = node.git_status
@@ -163,6 +164,7 @@ if icon_state.show_git_icon then
[" D"] = { { icon = icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" } },
["D "] = { { icon = icon_state.icons.git_icons.deleted, hl = "NvimTreeGitDeleted" } },
dirty = { { icon = icon_state.icons.git_icons.unstaged, hl = "NvimTreeGitDirty" } },
ignored = { { icon = icon_state.icons.git_icons.ignored, hl = "NvimTreeGitIgnored" } },
}
get_git_icons = function(node, line, depth, icon_len)