chore: resolve undefined-field
This commit is contained in:
parent
44281f7999
commit
009b2c996e
@ -4,7 +4,7 @@ local DirectoryNode = require("nvim-tree.node.directory")
|
||||
|
||||
---@class (exact) DirectoryLinkNode: DirectoryNode
|
||||
---@field link_to string absolute path
|
||||
---@field fs_stat_target uv.fs_stat.result
|
||||
---@field private fs_stat_target uv.fs_stat.result
|
||||
local DirectoryLinkNode = DirectoryNode:new()
|
||||
|
||||
---Static factory method
|
||||
|
||||
@ -7,8 +7,8 @@ local Node = require("nvim-tree.node")
|
||||
---@field group_next DirectoryNode? -- If node is grouped, this points to the next child dir/link node
|
||||
---@field nodes Node[]
|
||||
---@field open boolean
|
||||
---@field watcher Watcher?
|
||||
---@field hidden_stats table? -- Each field of this table is a key for source and value for count
|
||||
---@field private watcher Watcher?
|
||||
local DirectoryNode = Node:new()
|
||||
|
||||
---Static factory method
|
||||
@ -31,11 +31,11 @@ function DirectoryNode:create(explorer, parent, absolute_path, name, fs_stat)
|
||||
fs_stat = fs_stat,
|
||||
git_status = nil,
|
||||
hidden = false,
|
||||
is_dot = false,
|
||||
name = name,
|
||||
parent = parent,
|
||||
watcher = nil,
|
||||
diag_status = nil,
|
||||
is_dot = false,
|
||||
|
||||
has_children = has_children,
|
||||
group_next = nil,
|
||||
|
||||
@ -4,7 +4,7 @@ local FileNode = require("nvim-tree.node.file")
|
||||
|
||||
---@class (exact) FileLinkNode: FileNode
|
||||
---@field link_to string absolute path
|
||||
---@field fs_stat_target uv.fs_stat.result
|
||||
---@field private fs_stat_target uv.fs_stat.result
|
||||
local FileLinkNode = FileNode:new()
|
||||
|
||||
---Static factory method
|
||||
|
||||
@ -24,10 +24,10 @@ function FileNode:create(explorer, parent, absolute_path, name, fs_stat)
|
||||
fs_stat = fs_stat,
|
||||
git_status = nil,
|
||||
hidden = false,
|
||||
is_dot = false,
|
||||
name = name,
|
||||
parent = parent,
|
||||
diag_status = nil,
|
||||
is_dot = false,
|
||||
|
||||
extension = string.match(name, ".?[^.]+%.(.*)") or "",
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ local Class = require("nvim-tree.class")
|
||||
---@field name string
|
||||
---@field parent DirectoryNode?
|
||||
---@field diag_status DiagStatus?
|
||||
---@field is_dot boolean cached is_dotfile
|
||||
---@field private is_dot boolean cached is_dotfile
|
||||
local Node = Class:new()
|
||||
|
||||
function Node:destroy()
|
||||
@ -82,10 +82,10 @@ function Node:clone()
|
||||
fs_stat = self.fs_stat,
|
||||
git_status = self.git_status,
|
||||
hidden = self.hidden,
|
||||
is_dot = self.is_dot,
|
||||
name = self.name,
|
||||
parent = nil,
|
||||
diag_status = nil,
|
||||
is_dot = self.is_dot,
|
||||
}
|
||||
|
||||
return clone
|
||||
|
||||
Loading…
Reference in New Issue
Block a user