diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2025-05-29 12:04:37 +0200 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-05-29 12:11:56 +0200 |
| commit | ce903fde5d36d7955d34faaf0b812a186417e746 (patch) | |
| tree | 003741994ecacd01de6c4a09f258ac5374ae8e59 /doc | |
| parent | fix(config): check both installed parsers and queries (diff) | |
| download | nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.tar nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.tar.gz nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.tar.bz2 nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.tar.lz nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.tar.xz nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.tar.zst nvim-treesitter-ce903fde5d36d7955d34faaf0b812a186417e746.zip | |
feat(api): expose list of available and installed languages
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/nvim-treesitter.txt | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index 77e6f037f..9ba6909b7 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -102,7 +102,7 @@ setup({opts}) *nvim-treesitter.setup()* directory to install parsers and queries to. Note: will be prepended to |runtimepath|. -install({languages} [, {opts}]) *nvim-treesitter.install()* +install({languages} [, {opts}]) *nvim-treesitter.install()* Download, compile, and install the specified treesitter parsers and copy the corresponding queries to a directory on |runtimepath|, enabling their @@ -126,7 +126,7 @@ install({languages} [, {opts}]) *nvim-treesitter.install()* • {max_jobs} (`integer?`) limit parallel tasks (useful in combination with {generate} on memory-limited systems). -uninstall({languages}) *nvim-treesitter.uninstall()* +uninstall({languages}) *nvim-treesitter.uninstall()* Remove the parser and queries for the specified language(s). @@ -134,7 +134,7 @@ uninstall({languages}) *nvim-treesitter.uninstall() • {languages} `(string[]|string)` (List of) languages or tiers (`stable`, `unstable`) to update. -update([{languages}]) *nvim-treesitter.update()* +update([{languages}]) *nvim-treesitter.update()* Update the parsers and queries if older than the revision specified in the manifest. @@ -153,5 +153,20 @@ indentexpr() *nvim-treesitter.indentexpr()* Used to enable treesitter indentation for a language via >lua vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" < +get_available([{tier}]) *nvim-treesitter.get_available()* + + Return list of languages available for installation. + + Parameters: ~ + • {tier} `(integer?)` Only return languages of specified {tier} (`1`: + stable, `2`: unstable, `3`: unmaintained, `4`: unsupported) + +get_installed([{type}]) *nvim-treesitter.get_installed()* + + Return list of languages installed via `nvim-treesitter`. + + Parameters: ~ + • {type} `('queries'|parsers'?)` If specified, only show languages with + installed queries or parsers, respectively. vim:tw=78:ts=8:expandtab:noet:ft=help:norl: |
