diff --git a/term/.config/nvim/lua/plugins/neo-tree.lua b/term/.config/nvim/lua/plugins/neo-tree.lua index e7d2958..9927125 100644 --- a/term/.config/nvim/lua/plugins/neo-tree.lua +++ b/term/.config/nvim/lua/plugins/neo-tree.lua @@ -1,22 +1,51 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - "nvim-tree/nvim-web-devicons", - }, - config = function() - require("neo-tree").setup({ - filesystem = { - use_libuv_file_watcher = true, -- Enable OS-level file watching for automatic git status updates - filtered_items = { - visible = true, - hide_dotfiles = false, - hide_hidden = false, - }, - }, - }) - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("neo-tree").setup({ + -- Performance optimizations for large repositories + git_status_async = true, + git_status_async_options = { + batch_size = 1000, -- Process git status in batches + batch_delay = 10, -- 10ms delay between batches + max_lines = 10000, -- Limit git status lines processed + }, + filesystem = { + use_libuv_file_watcher = true, -- Enable OS-level file watching for automatic git status updates + async_directory_scan = "always", -- Always scan directories asynchronously for better performance + scan_mode = "shallow", -- Don't scan deeply into directories (faster) + filtered_items = { + visible = true, + hide_dotfiles = false, + hide_hidden = false, + -- Hide common heavy directories to improve performance + hide_by_name = { + "node_modules", + ".git", + ".venv", + "venv", + "__pycache__", + ".pytest_cache", + ".mypy_cache", + ".ruff_cache", + ".hypothesis", + "target", + "dist", + "build", + }, + hide_by_pattern = { + "*.pyc", + "*.pyo", + "*.egg-info", + }, + }, + }, + }) + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, }