File tree 1 file changed +10
-1
lines changed 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
local utils = require " nvim-tree.utils"
2
2
local marks = require " nvim-tree.marks"
3
3
4
+ --- @class Filters to handle all opts.filters and related API
5
+ --- @field config table hydrated user opts.filters
6
+ --- @field private explorer Explorer
7
+ --- @field private exclude_list string[] filters.exclude
8
+ --- @field private ignore_list string[] filters.custom string table
9
+ --- @field private custom_function (fun (absolute_path : string ): boolean )| nil filters.custom function
4
10
local Filters = {}
5
11
12
+ --- @param opts table user options
13
+ --- @param explorer Explorer
14
+ --- @return Filters
6
15
function Filters :new (opts , explorer )
7
16
local o = {
8
17
explorer = explorer ,
@@ -144,7 +153,7 @@ local function custom(self, path)
144
153
local basename = utils .path_basename (path )
145
154
146
155
-- filter user's custom function
147
- if self .custom_function and self : custom_function (path ) then
156
+ if self .custom_function and self . custom_function (path ) then
148
157
return true
149
158
end
150
159
You can’t perform that action at this time.
0 commit comments