blob: 412a5ba8b2b4bd88586a2bc6aaa38b94fe14cd62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-- This file is an internal file-browser addon.
-- It should not be imported like a normal module.
local g = require 'modules.globals'
---Parser for the root.
---@type ParserConfig
local root_parser = {
name = "root",
priority = math.huge,
api_version = '1.0.0',
}
function root_parser:can_parse(directory)
return directory == ''
end
--we return the root directory exactly as setup
function root_parser:parse()
return g.root, {
sorted = true,
filtered = true,
}
end
return root_parser
|