Skip to content

Commit

Permalink
fix: use vim.iter():flatten():totable() over vim.tbl_flatten (#1454)
Browse files Browse the repository at this point in the history
  • Loading branch information
seblj committed May 16, 2024
1 parent e44636a commit d039aec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/lazy/help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit d039aec

Please sign in to comment.