* refactor(#2830): multi instance marks * refactor(#2830): multi instance marks * refactor(#2830): multi instance marks
This commit is contained in:
committed by
GitHub
parent
42340952af
commit
e962e97cab
@@ -194,7 +194,7 @@ function Filters:prepare(git_status)
|
||||
|
||||
local explorer = require("nvim-tree.core").get_explorer()
|
||||
if explorer then
|
||||
for _, node in pairs(explorer.marks:get_marks()) do
|
||||
for _, node in pairs(explorer.marks:list()) do
|
||||
status.bookmarks[node.absolute_path] = node.type
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ local notify = require "nvim-tree.notify"
|
||||
local watch = require "nvim-tree.explorer.watch"
|
||||
local explorer_node = require "nvim-tree.explorer.node"
|
||||
local Filters = require "nvim-tree.explorer.filters"
|
||||
local Marks = require "nvim-tree.marks"
|
||||
local Marks = {} -- circular dependencies
|
||||
local LiveFilter = require "nvim-tree.explorer.live-filter"
|
||||
local Sorters = require "nvim-tree.explorer.sorters"
|
||||
|
||||
@@ -44,12 +44,12 @@ function Explorer.new(path)
|
||||
absolute_path = path,
|
||||
nodes = {},
|
||||
open = true,
|
||||
marks = Marks:new(),
|
||||
sorters = Sorters:new(M.config),
|
||||
}, Explorer)
|
||||
explorer.watcher = watch.create_watcher(explorer)
|
||||
explorer.filters = Filters:new(M.config, explorer)
|
||||
explorer.live_filter = LiveFilter:new(M.config, explorer)
|
||||
explorer.marks = Marks:new(M.config, explorer)
|
||||
explorer:_load(explorer)
|
||||
return explorer
|
||||
end
|
||||
@@ -85,6 +85,8 @@ function M.setup(opts)
|
||||
require("nvim-tree.explorer.explore").setup(opts)
|
||||
require("nvim-tree.explorer.reload").setup(opts)
|
||||
require("nvim-tree.explorer.watch").setup(opts)
|
||||
|
||||
Marks = require "nvim-tree.marks"
|
||||
end
|
||||
|
||||
M.Explorer = Explorer
|
||||
|
||||
Reference in New Issue
Block a user