From 56a34a825b55e0e30cd9df0e055e428a13afd4aa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 19 May 2024 17:29:43 +0200 Subject: [PATCH] fix(help): get rid of any tbl_flatten or iter flatten code --- lua/lazy/help.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/lazy/help.lua b/lua/lazy/help.lua index a5fd741e..46b47fd6 100644 --- a/lua/lazy/help.lua +++ b/lua/lazy/help.lua @@ -8,12 +8,11 @@ function M.index(plugin) return {} end - ---@param file string - local tbl = vim.tbl_map(function(file) - return vim.fn.expand(plugin.dir .. "/" .. file, false, true) - end, Config.options.readme.files) + local files = {} - local files = vim.iter and vim.iter(tbl):flatten():totable() or vim.tbl_flatten(tbl) + for _, file in ipairs(Config.options.readme.files) do + vim.list_extend(files, vim.fn.expand(plugin.dir .. "/" .. file, false, true)) + end ---@type table local tags = {}