From dd0da420c2678bb37a4730a7da906a1f545537a9 Mon Sep 17 00:00:00 2001 From: orip Date: Wed, 28 May 2025 23:53:32 +0300 Subject: [PATCH] feat(install): Add a `quite` option to the `install()` method This flag skips the "[nvim-treesitter]: Installed X/X languages" message. fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/7872 --- lua/nvim-treesitter/install.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index e6933fe58..db267b18d 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -431,6 +431,7 @@ end ---@field force? boolean ---@field generate? boolean ---@field max_jobs? integer +---@field quiet? boolean --- Install a parser ---@async @@ -461,7 +462,9 @@ local function install(languages, options) join(options and options.max_jobs or MAX_JOBS, task_funs) if #task_funs > 1 then a.schedule() - log.info('Installed %d/%d languages', done, #task_funs) + if not options.quiet then + log.info('Installing %d/%d languages', done, #task_funs) + end end return done == #task_funs end