aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-11-28 20:04:45 +0100
committerStephan Seitz <stephan.lauf@yahoo.de>2020-11-29 16:37:09 +0100
commitbdabf38a5994dde6b4699458d4c26e6e08c90fab (patch)
tree3048f62882f853717e6cd6a8d6b620c5433bcb36 /lua
parenttypescript: Use javascript shorthand_property_identifier (diff)
downloadnvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.tar
nvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.tar.gz
nvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.tar.bz2
nvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.tar.lz
nvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.tar.xz
nvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.tar.zst
nvim-treesitter-bdabf38a5994dde6b4699458d4c26e6e08c90fab.zip
Fix: Print message when TSUpdate has nothing to do
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/install.lua11
1 files changed, 7 insertions, 4 deletions
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