return { 'nvim-neo-tree/neo-tree.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 'MunifTanjim/nui.nvim', }, init = function() -- Neotree: vim.keymap.set('n', 'nt', 'Neotree toggle', { desc = '[N]eo[t]ree toggle' }) vim.keymap.set('n', 'ntr', 'Neotree reveal', { desc = 'N[E]eo[t]ree toggle cu[r]rent' }) end, config = function() require('neo-tree').setup { close_if_last_window = true, default_component_configs = { indent = { indent_size = 1, padding = 1, -- extra padding on left hand side -- indent guides with_markers = true, indent_marker = '│', last_indent_marker = '└', highlight = 'NeoTreeIndentMarker', -- expander config, needed for nesting files with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders expander_collapsed = '', expander_expanded = '', expander_highlight = 'NeoTreeExpander', }, icon = { folder_closed = '', folder_open = '', folder_empty = '󰜌', -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there -- then these will never be used. default = '*', highlight = 'NeoTreeFileIcon', }, }, window = { position = 'left', width = 30, }, filesystem = { hide_dotfiles = false, follow_current_file = { enabled = true, -- This will find and focus the file in the active buffer every time -- -- the current file is changed while the tree is open. leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` }, }, } end, }