Skip to content

Commit 41585a8

Browse files
committed
chore(explorer): moving requires to top level
1 parent 6b1f5b8 commit 41585a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ local Clipboard = require("nvim-tree.actions.fs.clipboard")
2222
local Renderer = require("nvim-tree.renderer")
2323

2424
local FILTER_REASON = require("nvim-tree.enum").FILTER_REASON
25+
local change_dir = require("nvim-tree.actions.root.change-dir")
26+
local find_file = require("nvim-tree.actions.finders.find-file")
2527

2628
local config
2729

@@ -662,16 +664,16 @@ end
662664
---@param node Node
663665
function Explorer:dir_up(node)
664666
if not node or node.name == ".." then
665-
require("nvim-tree.actions.root.change-dir").fn("..")
667+
change_dir.fn("..")
666668
else
667669
local cwd = core.get_cwd()
668670
if cwd == nil then
669671
return
670672
end
671673

672674
local newdir = vim.fn.fnamemodify(utils.path_remove_trailing(cwd), ":h")
673-
require("nvim-tree.actions.root.change-dir").fn(newdir)
674-
require("nvim-tree.actions.finders.find-file").fn(node.absolute_path)
675+
change_dir.fn(newdir)
676+
find_file.fn(node.absolute_path)
675677
end
676678
end
677679

0 commit comments

Comments
 (0)