feat(config): add option allow_access_to_git_ignored_files (#2882)
This commit is contained in:
@@ -150,8 +150,9 @@ function M.has_permission_to_access(abs_path)
|
||||
local config_dir = vim.fn.stdpath("config")
|
||||
local in_project = abs_path:sub(1, #project_root) == project_root
|
||||
local in_config = abs_path:sub(1, #config_dir) == config_dir
|
||||
local bypass_ignore = Config.behaviour and Config.behaviour.allow_access_to_git_ignored_files
|
||||
if not in_project and not in_config then return false end
|
||||
return not M.is_ignored(abs_path)
|
||||
return bypass_ignore or not M.is_ignored(abs_path)
|
||||
end
|
||||
|
||||
---@param path string
|
||||
|
||||
Reference in New Issue
Block a user