refacto: move filters and sorters in their own modules
Also exclude filters is taken into account in git ignore fixes #892
This commit is contained in:
11
lua/nvim-tree/explorer/common.lua
Normal file
11
lua/nvim-tree/explorer/common.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local uv = vim.loop
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.has_one_child_folder(node)
|
||||
return #node.nodes == 1
|
||||
and node.nodes[1].nodes
|
||||
and uv.fs_access(node.nodes[1].absolute_path, 'R')
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user