nvimtree: Allow changing lazy load from chadrc | Resolve https://github.com/NvChad/NvChad/issues/621

a packerCompile is needed after changin the config value in chadrc
This commit is contained in:
Akianonymus 2021-12-24 23:35:13 +05:30 committed by siduck
parent 7be01383ab
commit a2d91acc84
2 changed files with 4 additions and 1 deletions

View file

@ -79,6 +79,8 @@ M.plugins = {
}, },
nvimtree = { nvimtree = {
enable_git = 0, enable_git = 0,
-- packerCompile required after changing lazy_load
lazy_load = true,
ui = { ui = {
allow_resize = true, allow_resize = true,

View file

@ -205,7 +205,8 @@ return packer.startup(function()
use { use {
"kyazdani42/nvim-tree.lua", "kyazdani42/nvim-tree.lua",
disable = not plugin_settings.status.nvimtree, disable = not plugin_settings.status.nvimtree,
cmd = { "NvimTreeToggle", "NvimTreeFocus" }, -- only set cmd if lazy load is enabled
cmd = plugin_settings.options.nvimtree.lazy_load and { "NvimTreeToggle", "NvimTreeFocus" },
config = override_req("nvim_tree", "plugins.configs.nvimtree"), config = override_req("nvim_tree", "plugins.configs.nvimtree"),
setup = function() setup = function()
require("core.mappings").nvimtree() require("core.mappings").nvimtree()