fix(install): return task object in API functions

This commit is contained in:
Christian Clason 2025-05-22 08:19:22 +02:00 committed by Christian Clason
parent d08cf75e1b
commit 011f02936f
2 changed files with 5 additions and 5 deletions

View file

@ -5,15 +5,15 @@ function M.setup(...)
end
function M.install(...)
require('nvim-treesitter.install').install(...)
return require('nvim-treesitter.install').install(...)
end
function M.uninstall(...)
require('nvim-treesitter.install').uninstall(...)
return require('nvim-treesitter.install').uninstall(...)
end
function M.update(...)
require('nvim-treesitter.install').update(...)
return require('nvim-treesitter.install').update(...)
end
function M.indentexpr()

View file

@ -22,8 +22,8 @@ vim.opt.runtimepath:append('.')
vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
---@type async.Task
local task = update and require('nvim-treesitter.install').update('all')
or require('nvim-treesitter.install').install(
local task = update and require('nvim-treesitter').update('all')
or require('nvim-treesitter').install(
#parsers > 0 and parsers or 'all',
{ force = true, generate = generate, max_jobs = max_jobs }
)