mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
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:
parent
5c3e8dee64
commit
a072d923c7
2 changed files with 4 additions and 3 deletions
|
|
@ -607,6 +607,9 @@ function M.get_ignored_parser_installs()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.get_ensure_installed_parsers()
|
function M.get_ensure_installed_parsers()
|
||||||
|
if type(config.ensure_installed) == "string" then
|
||||||
|
return { config.ensure_installed }
|
||||||
|
end
|
||||||
return config.ensure_installed or {}
|
return config.ensure_installed or {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -605,9 +605,7 @@ function M.uninstall(...)
|
||||||
if vim.tbl_contains({ "all" }, ...) then
|
if vim.tbl_contains({ "all" }, ...) then
|
||||||
reset_progress_counter()
|
reset_progress_counter()
|
||||||
local installed = info.installed_parsers()
|
local installed = info.installed_parsers()
|
||||||
for _, langitem in pairs(installed) do
|
M.uninstall(installed)
|
||||||
M.uninstall(langitem)
|
|
||||||
end
|
|
||||||
elseif ... then
|
elseif ... then
|
||||||
local ensure_installed_parsers = configs.get_ensure_installed_parsers()
|
local ensure_installed_parsers = configs.get_ensure_installed_parsers()
|
||||||
if ensure_installed_parsers == "all" then
|
if ensure_installed_parsers == "all" then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue