diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-11-28 20:04:45 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-11-29 16:37:09 +0100 |
| commit | bdabf38a5994dde6b4699458d4c26e6e08c90fab (patch) | |
| tree | 3048f62882f853717e6cd6a8d6b620c5433bcb36 /lua/nvim-treesitter/install.lua | |
| parent | 299b874d2fa96e193bd7bedd265e62b220a4cdb0 (diff) | |
Fix: Print message when TSUpdate has nothing to do
Diffstat (limited to 'lua/nvim-treesitter/install.lua')
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 4011a080..b1d1fc1f 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -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 |
