mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
fix(install): return task object in API functions
This commit is contained in:
parent
d08cf75e1b
commit
011f02936f
2 changed files with 5 additions and 5 deletions
|
|
@ -5,15 +5,15 @@ function M.setup(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.install(...)
|
function M.install(...)
|
||||||
require('nvim-treesitter.install').install(...)
|
return require('nvim-treesitter.install').install(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.uninstall(...)
|
function M.uninstall(...)
|
||||||
require('nvim-treesitter.install').uninstall(...)
|
return require('nvim-treesitter.install').uninstall(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.update(...)
|
function M.update(...)
|
||||||
require('nvim-treesitter.install').update(...)
|
return require('nvim-treesitter.install').update(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.indentexpr()
|
function M.indentexpr()
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ vim.opt.runtimepath:append('.')
|
||||||
vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
|
vim.fn.mkdir(vim.fn.stdpath('cache'), 'p')
|
||||||
|
|
||||||
---@type async.Task
|
---@type async.Task
|
||||||
local task = update and require('nvim-treesitter.install').update('all')
|
local task = update and require('nvim-treesitter').update('all')
|
||||||
or require('nvim-treesitter.install').install(
|
or require('nvim-treesitter').install(
|
||||||
#parsers > 0 and parsers or 'all',
|
#parsers > 0 and parsers or 'all',
|
||||||
{ force = true, generate = generate, max_jobs = max_jobs }
|
{ force = true, generate = generate, max_jobs = max_jobs }
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue