feat: option to set path destination to parent folder when cursor is on a closed folder while creating files (#628)
This commit is contained in:
@@ -57,8 +57,10 @@ function M.create(node)
|
||||
}
|
||||
end
|
||||
|
||||
local node_is_open = vim.g.nvim_tree_create_in_closed_folder == 1 or node.open
|
||||
|
||||
local add_into
|
||||
if node.entries ~= nil then
|
||||
if node.entries ~= nil and node_is_open then
|
||||
add_into = utils.path_add_trailing(node.absolute_path)
|
||||
else
|
||||
add_into = node.absolute_path:sub(0, -(#node.name + 1))
|
||||
|
||||
Reference in New Issue
Block a user