feat: add option to skip gitignored files on git navigation (#2583)

* feat: add option to skip gitignored files on git navigation

* Add API bindings

* stylua: ignore
This commit is contained in:
Azad
2023-12-19 11:29:01 +01:00
committed by GitHub
parent 8f92e1edd3
commit 50f30bcd8c
3 changed files with 14 additions and 1 deletions

View File

@@ -30,7 +30,8 @@ function M.fn(opts)
local valid = false
if opts.what == "git" then
valid = explorer_node.get_git_status(node) ~= nil
local git_status = explorer_node.get_git_status(node)
valid = git_status ~= nil and (not opts.skip_gitignored or git_status[1] ~= "!!")
elseif opts.what == "diag" then
valid = node.diag_status ~= nil
elseif opts.what == "opened" then