Files
work/term/.config/nvim/lua/plugins/neo-tree.lua
T

52 lines
1.4 KiB
Lua

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({
-- 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", "<C-n>", ":Neotree filesystem reveal left<CR>", {})
end,
}