return { "kyazdani42/nvim-tree.lua", config = function() -- nvim tree require("nvim-tree").setup({ update_cwd = true, diagnostics = { enable = true, }, }) -- close tab/vim when nvim-tree is the last window in the tab vim.api.nvim_create_autocmd("BufEnter", { pattern = "*", command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif", }) end, dependencies = { "kyazdani42/nvim-web-devicons", }, cmd = { "NvimTreeOpen", "NvimTreeToggle" }, }