Skip to content

Commit fb01d1a

Browse files
committed
refactor(#2875): multi instance renderer
1 parent 8ff10ce commit fb01d1a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lua/nvim-tree.lua

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ local lib = require "nvim-tree.lib"
22
local log = require "nvim-tree.log"
33
local appearance = require "nvim-tree.appearance"
44
local view = require "nvim-tree.view"
5-
local commands = require "nvim-tree.commands"
65
local utils = require "nvim-tree.utils"
76
local actions = require "nvim-tree.actions"
8-
local legacy = require "nvim-tree.legacy"
97
local core = require "nvim-tree.core"
10-
local git = require "nvim-tree.git"
11-
local buffers = require "nvim-tree.buffers"
128
local notify = require "nvim-tree.notify"
139

1410
local _config = {}
@@ -358,7 +354,7 @@ local function setup_autocommands(opts)
358354
create_nvim_tree_autocmd({ "BufModifiedSet", "BufWritePost" }, {
359355
callback = function()
360356
utils.debounce("Buf:modified", opts.view.debounce_delay, function()
361-
buffers.reload_modified()
357+
require("nvim-tree.buffers").reload_modified()
362358
local explorer = core.get_explorer()
363359
if explorer then
364360
explorer:reload_explorer()
@@ -808,7 +804,7 @@ function M.purge_all_state()
808804
view.close_all_tabs()
809805
view.abandon_all_windows()
810806
if core.get_explorer() ~= nil then
811-
git.purge_state()
807+
require("nvim-tree.git").purge_state()
812808
core.reset_explorer()
813809
end
814810
end
@@ -824,7 +820,7 @@ function M.setup(conf)
824820

825821
localise_default_opts()
826822

827-
legacy.migrate_legacy_options(conf or {})
823+
require("nvim-tree.legacy").migrate_legacy_options(conf or {})
828824

829825
validate_options(conf)
830826

@@ -870,7 +866,7 @@ function M.setup(conf)
870866

871867
if vim.g.NvimTreeSetup ~= 1 then
872868
-- first call to setup
873-
commands.setup()
869+
require("nvim-tree.commands").setup()
874870
else
875871
-- subsequent calls to setup
876872
M.purge_all_state()

0 commit comments

Comments
 (0)