Skip to content

Commit

Permalink
save changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aceforeverd committed Aug 6, 2023
1 parent 6b9b123 commit 59677e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/aceforeverd/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function M.setup()
-- <space>xxx -> view-only operators
-- <leader>xxx -> possibly write operators

vim.api.nvim_create_user_command('GetOldPlugins', [[lua require('aceforeverd.plugins.util').GetOldPlugins()]], {})
vim.api.nvim_create_user_command('PackCheckHealth', [[lua require('aceforeverd.plugins.util').GetOldPlugins()]], {})
end

return M
19 changes: 17 additions & 2 deletions lua/aceforeverd/plugins/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function GetRepo(repo)
end

function GetOldPlugins()
-- minpac plugins
local plugins = vim.fn['minpac#getpluglist']()
local out = {}
for _, value in pairs(plugins) do
Expand All @@ -14,11 +15,25 @@ function GetOldPlugins()
local stats = GetRepo(repo)

if stats ~= nil and stats.archived == true then
table.insert(out, {value, 'archived'})
table.insert(out, repo)
else
vim.notify('ok: ' .. repo, vim.log.levels.INFO, {})
end
end

vim.api.nvim_notify(vim.inspect(out), vim.log.levels.INFO, {})
-- lazy plugins
local lua_plugins = require('aceforeverd.plugins').plugin_list
for _, value in pairs(lua_plugins) do
local stats = GetRepo(value[0])

if stats ~= nil and stats.archived == true then
table.insert(out, value[0])
else
vim.notify('ok: ' .. value[0], vim.log.levels.INFO, {})
end
end

vim.notify('archived: ' .. vim.inspect(out), vim.log.levels.INFO, {})
end

return {
Expand Down

0 comments on commit 59677e3

Please sign in to comment.