fix(install): don't print operation summary by default

Problem: People complain about noisy `install()`.

Solution: Gate operation summary behind `summary` install option
(default false, set to true for interactive `:TS*` commands).
This commit is contained in:
Christian Clason
2025-05-29 12:25:13 +02:00
committed by Christian Clason
parent ce903fde5d
commit ff770d718b
4 changed files with 43 additions and 13 deletions

View File

@@ -19,10 +19,10 @@ end
vim.opt.runtimepath:append('.')
---@type async.Task
local task = update and require('nvim-treesitter').update('all')
local task = update and require('nvim-treesitter').update('all', { summary = true })
or require('nvim-treesitter').install(
#parsers > 0 and parsers or 'all',
{ force = true, generate = generate, max_jobs = max_jobs }
{ force = true, summary = true, generate = generate, max_jobs = max_jobs }
)
local ok, err_or_ok = task:pwait(1800000) -- wait max. 30 minutes