From 2856be357c87321ebba18fc54442ec3b384586e4 Mon Sep 17 00:00:00 2001 From: c-my Date: Mon, 30 Jan 2023 17:39:24 +0800 Subject: [PATCH] update nvimtree config --- lua/configs/plugins/nvimtree.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lua/configs/plugins/nvimtree.lua b/lua/configs/plugins/nvimtree.lua index 885327c..889f3a4 100644 --- a/lua/configs/plugins/nvimtree.lua +++ b/lua/configs/plugins/nvimtree.lua @@ -1,10 +1,12 @@ local nvimtree = require("nvim-tree") nvimtree.setup({ - open_on_setup = true, - open_on_setup_file = true, - open_on_tab = true, - ignore_ft_on_setup = { 'alpha', 'dashboard' }, + -- open_on_tab = true, + tab = { + sync = { + open = true, + } + }, diagnostics = { enable = true, show_on_dirs = false, @@ -16,3 +18,10 @@ nvimtree.setup({ group_empty = true, } }) + +local function open_nvim_tree() + -- open the tree + require("nvim-tree.api").tree.open() +end + +vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })