feat(ui): added section with disabled plugins

This commit is contained in:
Folke Lemaitre 2023-01-03 10:43:10 +01:00
parent 05aec48968
commit 299ffdfd53
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
5 changed files with 15 additions and 3 deletions

View file

@ -37,6 +37,7 @@ function M:update()
self.plugins = vim.tbl_values(Config.plugins)
vim.list_extend(self.plugins, vim.tbl_values(Config.to_clean))
vim.list_extend(self.plugins, vim.tbl_values(Config.spec.disabled))
table.sort(self.plugins, function(a, b)
return a.name < b.name
end)
@ -99,6 +100,8 @@ function M:get_plugin(row)
return plugin
end
end
elseif loc.kind == "disabled" then
return Config.spec.disabled[loc.name]
else
return Config.plugins[loc.name]
end

View file

@ -83,7 +83,7 @@ return {
},
{
filter = function(plugin)
return not plugin._.installed
return not plugin._.installed and plugin._.kind ~= "disabled"
end,
title = "Not Installed",
},
@ -99,4 +99,10 @@ return {
end,
title = "Not Loaded",
},
{
filter = function(plugin)
return plugin._.kind == "disabled"
end,
title = "Disabled",
},
}