feat(setup)!: remove ensure_install field

Instead, call `require('nvim-treesitter').install( { ... } )` manually.

This gives users full control over how they want to install parsers
(sync, from grammar, limited concurrency) and obviates the need for
calling `setup` for most users.
This commit is contained in:
Christian Clason 2025-04-27 13:02:32 +02:00
parent 73adbe597e
commit 522e0c6991
7 changed files with 37 additions and 46 deletions

View file

@ -4,6 +4,18 @@ function M.setup(...)
require('nvim-treesitter.config').setup(...)
end
function M.install(...)
require('nvim-treesitter.install').install(...)
end
function M.uninstall(...)
require('nvim-treesitter.install').uninstall(...)
end
function M.update(...)
require('nvim-treesitter.install').update(...)
end
function M.indentexpr()
return require('nvim-treesitter.indent').get_indent(vim.v.lnum)
end