From d039aecddb414c2df9d295e9182ed217196a2c1c Mon Sep 17 00:00:00 2001 From: Sebastian Lyng Johansen Date: Thu, 16 May 2024 21:44:51 +0200 Subject: [PATCH] fix: use vim.iter():flatten():totable() over vim.tbl_flatten (#1454) --- lua/lazy/help.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazy/help.lua b/lua/lazy/help.lua index aa7666e..a5fd741 100644 --- a/lua/lazy/help.lua +++ b/lua/lazy/help.lua @@ -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 local tags = {}