Fixed deletion
This commit is contained in:
parent
80f14036a8
commit
fbc50f9805
1 changed files with 6 additions and 4 deletions
|
|
@ -21,9 +21,11 @@ for name, _ in vim.fs.dir(config_module_path) do
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_user_command('UpdatePacks', function ()
|
vim.api.nvim_create_user_command('UpdatePacks', function ()
|
||||||
vim.iter(vim.pack.get())
|
local delete_candidates = vim.iter(vim.pack.get())
|
||||||
:filter(function(x) return not x.active end)
|
:filter(function(x) return not x.active end)
|
||||||
:map(function(x) return x.spec.name end)
|
:map(function(x) return x.spec.name end)
|
||||||
:totable()
|
:totable()
|
||||||
|
|
||||||
|
vim.pack.del(delete_candidates)
|
||||||
vim.pack.update()
|
vim.pack.update()
|
||||||
end, {})
|
end, {})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue