diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-04-27 13:02:32 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 522e0c6991c4852be9539dfe0d9f19eae998dfe6 (patch) | |
| tree | 7d9ef5fa44a0d76aa08c56ed95cf9bc1e9d2e83d /README.md | |
| parent | feat(parsers): update swift, tact, tcl, templ, mlir, kotlin, koto, elixir, ph... (diff) | |
| download | nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.tar nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.tar.gz nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.tar.bz2 nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.tar.lz nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.tar.xz nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.tar.zst nvim-treesitter-522e0c6991c4852be9539dfe0d9f19eae998dfe6.zip | |
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.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -53,17 +53,21 @@ require('lazy').setup( ```lua require'nvim-treesitter'.setup { - -- A list of parser names or tiers ('stable', 'unstable') - ensure_install = { 'stable' }, - - -- List of parsers to ignore when installing tiers - ignore_install = { 'rust' }, - -- Directory to install parsers and queries to install_dir = vim.fn.stdpath('data') .. '/site' + -- List of parsers to ignore when installing tiers + ignore_install = { }, } ``` +Parsers and queries can then be installed with + +```lua +require'nvim-treesitter'.install { 'rust', 'javascript', 'zig' } +``` + +(This is a no-op if the parsers are already installed.) Note that this function runs asynchronously; for synchronous installation in a script context ("bootstrapping"), adapt [this script](scripts/install-parsers.lua) to your needs. + Check [`:h nvim-treesitter-commands`](doc/nvim-treesitter.txt) for a list of all available commands. # Supported languages |
