mirror of https://github.com/folke/lazy.nvim.git
fix: use vim.iter():flatten():totable() over vim.tbl_flatten (#1454)
This commit is contained in:
parent
e44636a433
commit
d039aecddb
|
@ -9,9 +9,11 @@ function M.index(plugin)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param file string
|
---@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)
|
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}>
|
---@type table<string,{file:string, tag:string, line:string}>
|
||||||
local tags = {}
|
local tags = {}
|
||||||
|
|
Loading…
Reference in New Issue