We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8b44b6 commit 581aa42Copy full SHA for 581aa42
2 files changed
README.md
@@ -76,6 +76,11 @@ require("nvim-tree").setup({
76
dotfiles = true,
77
},
78
})
79
+
80
+-- OR use the following variable and nvim-tree will call setup lazily
81
+vim.g.NvimTreeConfig = {
82
+ on_attach = my_on_attach
83
+}
84
```
85
86
### Help
lua/nvim-tree/api.lua
@@ -50,7 +50,11 @@ local Api = {
50
---@return fun(...): any
51
local function wrap(fn)
52
return function(...)
53
- if vim.g.NvimTreeSetup == 1 then
+ if vim.g.NvimTreeSetup == 1 or vim.g.NvimTreeConfig then
54
+ if vim.g.NvimTreeSetup ~= 1 then
55
+ require("nvim-tree").setup(vim.g.NvimTreeConfig)
56
+ end
57
58
return fn(...)
59
else
60
notify.error("nvim-tree setup not called")
0 commit comments