build: utility method to create plugin list in markdown

This commit is contained in:
Folke Lemaitre 2022-12-30 23:58:01 +01:00
parent 45d669f61c
commit fb46cb5862
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 14 additions and 3 deletions

View file

@ -209,7 +209,9 @@ end
function M.foreach(t, fn)
---@type string[]
local keys = vim.tbl_keys(t)
pcall(table.sort, keys)
pcall(table.sort, keys, function(a, b)
return a:lower() < b:lower()
end)
for _, key in ipairs(keys) do
fn(key, t[key])
end