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