show some icon on opendir even if show_on_open_dir=false

and show all children's status on parent
This commit is contained in:
chomosuke
2022-12-06 21:09:35 +11:00
parent cd1df4f9bf
commit f65dc0d4e3
8 changed files with 141 additions and 51 deletions

View File

@@ -15,7 +15,7 @@ function M.fn(where, what)
for line, node in pairs(nodes_by_line) do
local valid = false
if what == "git" then
valid = explorer_common.shows_git_status(node)
valid = explorer_common.get_git_status(node) ~= nil
elseif what == "diag" then
valid = node.diag_status ~= nil
end

View File

@@ -20,6 +20,8 @@ end
function M.reload_node_status(parent_node, projects)
local project_root = git.get_project_root(parent_node.absolute_path)
local status = projects[project_root] or {}
require("nvim-tree.log").line("dev", "reloaders")
-- TODO: when is this called
for _, node in ipairs(parent_node.nodes) do
if node.nodes then
node.git_status = status.dirs and status.dirs[node.absolute_path]