add nvimtree_side global in nvimtree config func https://github.com/NvChad/ui/issues/68

also clean some lazy.nvim related variables
This commit is contained in:
siduck 2023-03-29 07:41:21 +05:30
parent 55de4b9c85
commit c77c086365
3 changed files with 3 additions and 7 deletions

View File

@ -89,7 +89,7 @@ M.ui = {
M.plugins = "" -- path i.e "custom.plugins" -> custom/plugins.lua only and not custom/plugins/init.lua!!!! 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 -- these are default mappings, check core.mappings for table structure
M.mappings = {} M.mappings = {}

View File

@ -73,6 +73,4 @@ local options = {
}, },
} }
vim.g.nvimtree_side = options.view.side
return options return options

View File

@ -211,6 +211,7 @@ local default_plugins = {
config = function(_, opts) config = function(_, opts)
dofile(vim.g.base46_cache .. "nvimtree") dofile(vim.g.base46_cache .. "nvimtree")
require("nvim-tree").setup(opts) require("nvim-tree").setup(opts)
vim.g.nvimtree_side = opts.view.side
end, end,
}, },
@ -256,7 +257,4 @@ if #config.plugins > 0 then
table.insert(default_plugins, { import = config.plugins }) table.insert(default_plugins, { import = config.plugins })
end end
-- lazy_nvim startup opts require("lazy").setup(default_plugins, config.lazy_nvim)
local lazy_config = vim.tbl_deep_extend("force", require "plugins.configs.lazy_nvim", config.lazy_nvim)
require("lazy").setup(default_plugins, lazy_config)