restore-feat: highlight-git-ignored-files (#847)
This commit is contained in:
parent
9c0f410c50
commit
0982c6a35a
@ -256,9 +256,9 @@ Here is a list of the options available in the setup call:
|
||||
type: `boolean`
|
||||
default: `true`
|
||||
|
||||
- |git.ignore|: ignore files based on `.gitignore`.
|
||||
will add `ignored=matching` to the integration when `true`. Otherwise will
|
||||
add `ignored=no` to the integration which can lead to better performance.
|
||||
- |git.ignore|: ignore files based on `.gitignore`
|
||||
type: `boolean`
|
||||
default: `true`
|
||||
|
||||
- |git.timeout|: kills the git process after some time if it takes too long
|
||||
type: `number`
|
||||
|
||||
@ -19,7 +19,7 @@ function M.reload(callback)
|
||||
Runner.run {
|
||||
project_root = project_root,
|
||||
list_untracked = git_utils.should_show_untracked(project_root),
|
||||
list_ignored = M.config.ignore,
|
||||
list_ignored = true,
|
||||
timeout = M.config.timeout,
|
||||
on_end = function(git_status)
|
||||
M.projects[project_root] = {
|
||||
@ -67,7 +67,7 @@ function M.load_project_status(cwd, callback)
|
||||
Runner.run {
|
||||
project_root = project_root,
|
||||
list_untracked = git_utils.should_show_untracked(project_root),
|
||||
list_ignored = M.config.ignore,
|
||||
list_ignored = true,
|
||||
timeout = M.config.timeout,
|
||||
on_end = function(git_status)
|
||||
M.projects[project_root] = {
|
||||
|
||||
@ -155,7 +155,8 @@ local function should_ignore(path)
|
||||
end
|
||||
|
||||
local function should_ignore_git(path, status)
|
||||
return M.config.filter_ignored and (status and status[path] == '!!')
|
||||
return M.config.filter_ignored
|
||||
and (M.config.filter_git_ignored and status and status[path] == '!!')
|
||||
end
|
||||
|
||||
function M.refresh_entries(entries, cwd, parent_node, status)
|
||||
@ -358,6 +359,7 @@ function M.setup(opts)
|
||||
M.config = {
|
||||
filter_ignored = true,
|
||||
filter_dotfiles = opts.filters.dotfiles,
|
||||
filter_git_ignored = opts.git.ignore,
|
||||
}
|
||||
|
||||
M.exclude_list = opts.filters.exclude
|
||||
|
||||
Loading…
Reference in New Issue
Block a user