From c77c086365f8bd81334d5a39b732664da232356b Mon Sep 17 00:00:00 2001 From: siduck Date: Wed, 29 Mar 2023 07:41:21 +0530 Subject: [PATCH] add nvimtree_side global in nvimtree config func https://github.com/NvChad/ui/issues/68 also clean some lazy.nvim related variables --- lua/core/default_config.lua | 2 +- lua/plugins/configs/nvimtree.lua | 2 -- lua/plugins/init.lua | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 7d8c4ea..bf143d2 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -89,7 +89,7 @@ M.ui = { M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! -M.lazy_nvim = {} -- config for lazy.nvim startup options +M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options -- these are default mappings, check core.mappings for table structure M.mappings = {} diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 0fda31c..6cafb04 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -73,6 +73,4 @@ local options = { }, } -vim.g.nvimtree_side = options.view.side - return options diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 9bd34e8..82b549f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -211,6 +211,7 @@ local default_plugins = { config = function(_, opts) dofile(vim.g.base46_cache .. "nvimtree") require("nvim-tree").setup(opts) + vim.g.nvimtree_side = opts.view.side end, }, @@ -256,7 +257,4 @@ if #config.plugins > 0 then table.insert(default_plugins, { import = config.plugins }) end --- lazy_nvim startup opts -local lazy_config = vim.tbl_deep_extend("force", require "plugins.configs.lazy_nvim", config.lazy_nvim) - -require("lazy").setup(default_plugins, lazy_config) +require("lazy").setup(default_plugins, config.lazy_nvim)