From 4eaca06ee2346061edc4e0d823039acbd24f2c88 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 16 May 2025 14:27:59 +0200 Subject: [PATCH] fixup --- lua/nvim-treesitter/install.lua | 3 +-- scripts/install-parsers.lua | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 255ddc087..006d4fc7f 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -466,8 +466,7 @@ M.install = a.async(function(languages, options) end) ---@param languages? string[]|string ----@param _options? table -M.update = a.async(function(languages, _options) +M.update = a.async(function(languages) reload_parsers() if not languages or #languages == 0 then languages = 'all' diff --git a/scripts/install-parsers.lua b/scripts/install-parsers.lua index c551d2de1..7fb41fd1e 100755 --- a/scripts/install-parsers.lua +++ b/scripts/install-parsers.lua @@ -21,15 +21,13 @@ vim.opt.runtimepath:append('.') -- needed on CI vim.fn.mkdir(vim.fn.stdpath('cache'), 'p') -local nvts_install = require('nvim-treesitter.install') - local task = nil if update then --- @type async.Task - task = nvts_install.update('all') + task = require('nvim-treesitter.install').update('all') else --- @type async.Task - task = nvts_install.install( + task = require('nvim-treesitter.install').install( #parsers > 0 and parsers or 'all', { force = true, generate = generate, max_jobs = max_jobs } ) @@ -40,6 +38,5 @@ if not ok then print('ERROR: ', err_or_ok) vim.cmd.cq() elseif not err_or_ok then - print('Did not install all parsers') vim.cmd.cq() end