File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,8 @@ Here is a list of the options available in the setup call:
405
405
type: `boolean `
406
406
default: `false`
407
407
408
- - | filters.custom | : custom list of string that will not be shown.
408
+ - | filters.custom | : custom list of vim regex for file/directory names that will not be shown.
409
+ Backslashes must be escaped e.g. "^\\.git". See | string-match | .
409
410
type: `{string }`
410
411
default: `{}`
411
412
Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ function M.should_ignore(path)
35
35
end
36
36
37
37
local relpath = utils .path_relative (path , vim .loop .cwd ())
38
- if M .ignore_list [relpath ] == true or M .ignore_list [basename ] == true then
39
- return true
38
+ for pat , _ in pairs (M .ignore_list ) do
39
+ if vim .fn .match (relpath , pat ) ~= - 1 or vim .fn .match (basename , pat ) ~= - 1 then
40
+ return true
41
+ end
40
42
end
41
43
42
44
local idx = path :match " .+()%.[^.]+$"
You can’t perform that action at this time.
0 commit comments