refactor: rewrite installation using jobs and async

Replace sync variants with callback support
This commit is contained in:
Lewis Russell 2023-05-22 14:35:25 +01:00 committed by Christian Clason
parent 5aa2984a02
commit cde679e435
15 changed files with 951 additions and 709 deletions

View file

@ -38,16 +38,13 @@ To install supported parsers and queries, put this in your `init.lua` file:
>lua
require'nvim-treesitter.configs'.setup {
-- A directory to install the parsers into.
-- A directory to install the parsers and queries to.
-- Defaults to the `stdpath('data')/site` dir.
install_dir = "/some/path/to/store/parsers",
-- A list of parser names, or "core", "stable", "community", "unstable"
ensure_install = { "core", "rust" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
auto_install = false,
@ -66,10 +63,6 @@ COMMANDS *nvim-treesitter-commands*
Install one or more treesitter parsers.
You can use |:TSInstall| `all` to install all parsers. Use |:TSInstall!| to
force the reinstallation of already installed parsers.
*:TSInstallSync*
:TSInstallSync {language} ... ~
Perform the |:TSInstall| operation synchronously.
*:TSInstallInfo*
:TSInstallInfo ~
@ -83,11 +76,6 @@ Update the installed parser for one more {language} or all installed parsers
if {language} is omitted. The specified parser is installed if it is not already
installed.
*:TSUpdateSync*
:TSUpdateSync {language} ... ~
Perform the |:TSUpdate| operation synchronously.
*:TSUninstall*
:TSUninstall {language} ... ~