From 7c9bf9cbe38b898bada23bd8da98eeac23625c73 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 12 Dec 2021 08:49:40 +0530 Subject: [PATCH] add some options for nvimtree --- lua/core/default_config.lua | 6 ++++++ lua/plugins/configs/nvimtree.lua | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 001c5a8..975a01d 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -79,6 +79,12 @@ M.plugins = { }, nvimtree = { enable_git = 0, + + ui = { + allow_resize = true, + side = "left", + width = 25, + }, }, luasnip = { snippet_path = {}, diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 58c89d4..131f4ad 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -1,5 +1,9 @@ local present, nvimtree = pcall(require, "nvim-tree") -local git_status = require("core.utils").load_config().plugins.options.nvimtree.enable_git + +local conf = require("core.utils").load_config().plugins.options.nvimtree + +local git_status = conf.enable_git +local ui = conf.ui if not present then return @@ -62,12 +66,7 @@ nvimtree.setup { enable = true, update_cwd = false, }, - view = { - allow_resize = true, - side = "left", - width = 25, - }, - + view = ui, git = { ignore = false, },