Skip to content

Commit 2b8623e

Browse files
committed
fix: moving directory and file nodes require to avoid circular depency
1 parent b0ac951 commit 2b8623e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lua/nvim-tree/node/init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
local Class = require("nvim-tree.classic")
2-
local DirectoryNode = require("nvim-tree.node.directory")
3-
local FileNode = require("nvim-tree.node.file")
42

53
---Abstract Node class.
64
---@class (exact) Node: Class
@@ -148,6 +146,9 @@ end
148146

149147
---@param expand_opts ApiTreeExpandOpts?
150148
function Node:expand(expand_opts)
149+
local DirectoryNode = require("nvim-tree.node.directory")
150+
local FileNode = require("nvim-tree.node.file")
151+
151152
if self:is(FileNode) then
152153
self.parent:expand(expand_opts)
153154
else

0 commit comments

Comments
 (0)