fix: use vim.iter():flatten():totable() over vim.tbl_flatten (#1454)

This commit is contained in:
Sebastian Lyng Johansen 2024-05-16 21:44:51 +02:00 committed by GitHub
parent e44636a433
commit d039aecddb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -9,9 +9,11 @@ function M.index(plugin)
end
---@param file string
local files = vim.tbl_flatten(vim.tbl_map(function(file)
local tbl = vim.tbl_map(function(file)
return vim.fn.expand(plugin.dir .. "/" .. file, false, true)
end, Config.options.readme.files))
end, Config.options.readme.files)
local files = vim.iter and vim.iter(tbl):flatten():totable() or vim.tbl_flatten(tbl)
---@type table<string,{file:string, tag:string, line:string}>
local tags = {}