Closed
Description
Can this functionality be implemented utilising API?
no, static config
Is your feature request related to a problem? Please describe.
Ignore directories based on dynamic conditions.
Describe the solution you'd like
filesystem_watchers.ignore_dirs
and git.disable_for_dirs
can be fun(string): boolean
where string is the absolute path of the directory.
Describe alternatives you've considered
Setting dirs dynamically before setup.
Additional context
Use case:
local IGNORE_PATHS = {
vim.env.HOME .. "/src/nvim-tree/r/dyn/foo",
vim.env.HOME .. "/src/nvim-tree/r/dyn/bar",
}
local function ignore_path(path)
for _, p in ipairs(IGNORE_PATHS) do
if path:find(p, 1, true) == 1 then
return true
end
end
return false
end
foo/master, foo/worktree1 and bar repos will return false