feat(view): add filters.git_clean, filters.no_buffer (#1784)

* feat(view): add filters.git_clean

* feat(view): add filters.git_clean

* feat(view): add filters.no_buffer

* feat(view): filters.no_buffer misses unloaded, handles buffer in/out

* feat(view): filters.no_buffer matches directories specifically

* feat(view): filters.no_buffer clarify targets

* feat: add placeholder filters.diagnostics_ok, refactor filters

* feat(view): remove placeholder filters.diagnostics_ok
This commit is contained in:
Alexander Courtis
2022-12-10 15:55:33 +11:00
committed by GitHub
parent e49fa4e529
commit c5dc80c36b
12 changed files with 214 additions and 77 deletions

View File

@@ -14,6 +14,8 @@ local function search(search_dir, input_path)
local function iter(dir)
local realpath, path, name, stat, handle, _
local filter_status = filters.prepare()
handle, _ = vim.loop.fs_scandir(dir)
if not handle then
return
@@ -34,7 +36,7 @@ local function search(search_dir, input_path)
break
end
if not filters.should_ignore(path) then
if not filters.should_filter(path, filter_status) then
if string.find(path, "/" .. input_path .. "$") then
return path
end