From 1eda2569394f866360e61f590f1796877388cb8a Mon Sep 17 00:00:00 2001 From: Tomasz N Date: Mon, 10 Nov 2025 23:09:02 +0100 Subject: [PATCH] feat: load command definitions at nvim startup (#3211) feat: load command definitions in `plugin` directory --- lua/nvim-tree.lua | 5 +---- plugin/nvim-tree.lua | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 plugin/nvim-tree.lua diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 4b8389e9..18858af1 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 00000000..e9a36dc7 --- /dev/null +++ b/plugin/nvim-tree.lua @@ -0,0 +1 @@ +require("nvim-tree.commands").setup()