neotree performance opti

This commit is contained in:
Mathias Schneider
2026-04-09 21:09:14 +02:00
parent f009dd3b68
commit 5e26805b38
+30 -1
View File
@@ -8,15 +8,44 @@ return {
}, },
config = function() config = function()
require("neo-tree").setup({ 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 = { filesystem = {
use_libuv_file_watcher = true, -- Enable OS-level file watching for automatic git status updates 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 = { filtered_items = {
visible = true, visible = true,
hide_dotfiles = false, hide_dotfiles = false,
hide_hidden = 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', '<C-n>', ':Neotree filesystem reveal left<CR>', {}) vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>", {})
end, end,
} }