return { "nvim-neo-tree/neo-tree.nvim", enabled = false, branch = "v2.x", dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended "MunifTanjim/nui.nvim", }, cmd = "Neotree", init = function() vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.neo_tree_remove_legacy_commands = 1 vim.keymap.set("n", "nn", "Neotree left reveal reveal_force_cwd") vim.keymap.set("n", "nb", "Neotree toggle show buffers right") if vim.fn.argc() == 1 then local stat = vim.loop.fs_stat(vim.fn.argv(0)) if stat and stat.type == "directory" then require "neo-tree" end end end, config = true, opts = { close_if_last_window = true, use_popups_for_input = false, filesystem = { window = { mappings = { ["Z"] = "expand_all_nodes", [""] = "toggle_node", }, }, filtered_items = { hide_dotfiles = false, }, group_empty_dirs = true, hijack_netrw_behavior = "open_current", }, buffers = { bind_to_cwd = true, follow_current_file = true, group_empty_dirs = true, }, git_status = { group_empty_dirs = true, }, source_selector = { winbar = true, statusline = false, }, }, }