fix: uninstall function in the install.lua

The get_ensure_installed_parsers function return a table
for the option "all" because uninstall accepts a table
This commit is contained in:
Sergey Kacheev 2022-09-12 23:37:16 +07:00 committed by Stephan Seitz
parent 5c3e8dee64
commit a072d923c7
2 changed files with 4 additions and 3 deletions

View file

@ -605,9 +605,7 @@ function M.uninstall(...)
if vim.tbl_contains({ "all" }, ...) then
reset_progress_counter()
local installed = info.installed_parsers()
for _, langitem in pairs(installed) do
M.uninstall(langitem)
end
M.uninstall(installed)
elseif ... then
local ensure_installed_parsers = configs.get_ensure_installed_parsers()
if ensure_installed_parsers == "all" then