diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 4b8389e93a0..18858af14f3 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -759,10 +759,7 @@ function M.setup(conf) setup_autocommands(opts) - if vim.g.NvimTreeSetup ~= 1 then - -- first call to setup - require("nvim-tree.commands").setup() - else + if vim.g.NvimTreeSetup == 1 then -- subsequent calls to setup M.purge_all_state() end diff --git a/plugin/nvim-tree.lua b/plugin/nvim-tree.lua new file mode 100644 index 00000000000..e9a36dc7d86 --- /dev/null +++ b/plugin/nvim-tree.lua @@ -0,0 +1 @@ +require("nvim-tree.commands").setup()