explorer/common.lua -> explorer/node.lua
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local utils = require "nvim-tree.utils"
|
||||
local builders = require "nvim-tree.explorer.node-builders"
|
||||
local common = require "nvim-tree.explorer.common"
|
||||
local explorer_node = require "nvim-tree.explorer.node"
|
||||
local sorters = require "nvim-tree.explorer.sorters"
|
||||
local filters = require "nvim-tree.explorer.filters"
|
||||
local live_filter = require "nvim-tree.live-filter"
|
||||
@@ -13,7 +13,7 @@ local function get_type_from(type_, cwd)
|
||||
end
|
||||
|
||||
local function populate_children(handle, cwd, node, git_status)
|
||||
local node_ignored = common.is_git_ignored(node)
|
||||
local node_ignored = explorer_node.is_git_ignored(node)
|
||||
local nodes_by_path = utils.bool_record(node.nodes, "absolute_path")
|
||||
local filter_status = filters.prepare(git_status)
|
||||
while true do
|
||||
@@ -39,7 +39,7 @@ local function populate_children(handle, cwd, node, git_status)
|
||||
if child then
|
||||
table.insert(node.nodes, child)
|
||||
nodes_by_path[child.absolute_path] = true
|
||||
common.update_git_status(child, node_ignored, git_status)
|
||||
explorer_node.update_git_status(child, node_ignored, git_status)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -64,7 +64,7 @@ function M.explore(node, status)
|
||||
populate_children(handle, cwd, node, status)
|
||||
|
||||
local is_root = not node.parent
|
||||
local child_folder_only = common.has_one_child_folder(node) and node.nodes[1]
|
||||
local child_folder_only = explorer_node.has_one_child_folder(node) and node.nodes[1]
|
||||
if M.config.group_empty and not is_root and child_folder_only then
|
||||
node.group_next = child_folder_only
|
||||
local ns = M.explore(child_folder_only, status)
|
||||
|
||||
Reference in New Issue
Block a user