From bdabf38a5994dde6b4699458d4c26e6e08c90fab Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 28 Nov 2020 20:04:45 +0100 Subject: Fix: Print message when TSUpdate has nothing to do --- lua/nvim-treesitter/install.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 4011a0807..b1d1fc1fb 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 -- cgit v1.2.3-70-g09d2