refactor: cleanup sections and fixed handlers in view

This commit is contained in:
Folke Lemaitre 2022-11-27 11:03:17 +01:00
parent 6dc45ada55
commit 08f4804916
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 13 additions and 37 deletions

View file

@ -1,7 +1,7 @@
local Config = require("lazy.core.config")
local Util = require("lazy.util")
local Sections = require("lazy.view.sections")
local Loader = require("lazy.core.loader")
local Handler = require("lazy.core.handler")
local Plugin = require("lazy.core.plugin")
local Text = require("lazy.view.text")
@ -303,11 +303,11 @@ function M:details(plugin)
table.insert(props, { "readme", "README.md" })
end
for _, loader in ipairs(Loader.types) do
if plugin[loader] then
for handler in ipairs(Handler.handlers) do
if plugin[handler] then
table.insert(props, {
loader,
type(plugin[loader]) == "string" and plugin[loader] or table.concat(plugin[loader], ", "),
handler,
type(plugin[handler]) == "string" and plugin[handler] or table.concat(plugin[handler], ", "),
"@string",
})
end