fix: defer the options check
the new setup refactoring might have some issues when users require the tree before setting up global options, which might result in a startup check not detecting those out of date options.
This commit is contained in:
@@ -438,6 +438,7 @@ function M.setup(conf)
|
|||||||
vim.schedule(function() M.on_enter(opts) end)
|
vim.schedule(function() M.on_enter(opts) end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function startup_check_new_setup()
|
||||||
local out_config = {
|
local out_config = {
|
||||||
"nvim_tree_disable_netrw",
|
"nvim_tree_disable_netrw",
|
||||||
"nvim_tree_hijack_netrw",
|
"nvim_tree_hijack_netrw",
|
||||||
@@ -461,5 +462,8 @@ if #x > 0 then
|
|||||||
local msg = "following options are now set in the setup, please read the new documentation for the setup function: "
|
local msg = "following options are now set in the setup, please read the new documentation for the setup function: "
|
||||||
require'nvim-tree.utils'.echo_warning(msg..table.concat(x, " | "))
|
require'nvim-tree.utils'.echo_warning(msg..table.concat(x, " | "))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.defer_fn(startup_check_new_setup, 1000)
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user