mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
Fix: Print message when TSUpdate has nothing to do
This commit is contained in:
parent
299b874d2f
commit
bdabf38a59
1 changed files with 7 additions and 4 deletions
|
|
@ -282,10 +282,13 @@ function M.update(lang)
|
||||||
if lang and lang ~= 'all' then
|
if lang and lang ~= 'all' then
|
||||||
install(false, 'force')(lang)
|
install(false, 'force')(lang)
|
||||||
else
|
else
|
||||||
local installed = configs.get_update_strategy() == 'lockfile'
|
local parsers_to_update = configs.get_update_strategy() == 'lockfile'
|
||||||
and outdated_parsers()
|
and outdated_parsers()
|
||||||
or info.installed_parsers()
|
or info.installed_parsers()
|
||||||
for _, lang in pairs(installed) do
|
if #parsers_to_update == 0 then
|
||||||
|
print('All parsers are up-to-date!')
|
||||||
|
end
|
||||||
|
for _, lang in pairs(parsers_to_update) do
|
||||||
install(false, 'force')(lang)
|
install(false, 'force')(lang)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue