mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 20:40:02 -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
|
||||
install(false, 'force')(lang)
|
||||
else
|
||||
local installed = configs.get_update_strategy() == 'lockfile'
|
||||
and outdated_parsers()
|
||||
or info.installed_parsers()
|
||||
for _, lang in pairs(installed) do
|
||||
local parsers_to_update = configs.get_update_strategy() == 'lockfile'
|
||||
and outdated_parsers()
|
||||
or info.installed_parsers()
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue