diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-04-09 11:50:54 +0200 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-04-10 13:24:57 +0200 |
| commit | acd01551a3185118f58f0708b7fffdb2465e39f1 (patch) | |
| tree | b381d98f489c6381b3a505a23024794dc38fa1cb | |
| parent | highlights(json): highlight ":" (diff) | |
| download | nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.tar nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.tar.gz nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.tar.bz2 nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.tar.lz nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.tar.xz nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.tar.zst nvim-treesitter-acd01551a3185118f58f0708b7fffdb2465e39f1.zip | |
chore!: deprecate ensure_installed=maintained
BREAKING CHANGE: specify explicit list or use `ensure_installed='all'`
(not recommended)
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | doc/nvim-treesitter.txt | 8 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 4 |
3 files changed, 14 insertions, 11 deletions
@@ -103,13 +103,13 @@ All modules are disabled by default and need to be activated explicitly in your ```lua require'nvim-treesitter.configs'.setup { - -- One of "all", "maintained" (parsers with maintainers), or a list of languages - ensure_installed = "maintained", + -- A list of parser names, or "all" + ensure_installed = { "c", "lua", "rust" }, - -- Install languages synchronously (only applied to `ensure_installed`) + -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, - -- List of parsers to ignore installing + -- List of parsers to ignore installing (for "all") ignore_install = { "javascript" }, highlight = { @@ -150,9 +150,8 @@ For `nvim-treesitter` to support a specific feature for a specific language requ The following is a list of languages for which a parser can be installed through `:TSInstall`; a checked box means that `nvim-treesitter` also contains queries at least for the `highlight` module. -Experimental parsers are parsers that are maintained, but not stable enough for -daily use yet. They are excluded from automatic installation when -`ensure_installed` is set to `"maintained"`. +Experimental parsers are parsers that have a maintainer but are not stable enough for +daily use yet. We are looking for maintainers to add more parsers and to write query files for their languages. Check our [tracking issue](https://github.com/nvim-treesitter/nvim-treesitter/issues/2282) for open language requests. diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index 7ffa43f2b..edb8579e8 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -39,13 +39,13 @@ To enable supported features, put this in your `init.lua` file: > require'nvim-treesitter.configs'.setup { - -- One of "all", "maintained" (parsers with maintainers), or a list of languages - ensure_installed = "maintained", + -- A list of parser names, or "all" + ensure_installed = { "c", "lua", "rust" }, - -- Install languages synchronously (only applied to `ensure_installed`) + -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, - -- List of parsers to ignore installing + -- List of parsers to ignore installing (for "all") ignore_install = { "javascript" }, highlight = { diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 1c442d0d8..88b33467e 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1042,6 +1042,10 @@ function M.available_parsers() end function M.maintained_parsers() + require("nvim-treesitter.utils").notify( + "ensure_installed='maintained' will be removed April 30, 2022. Specify parsers explicitly or use 'all'.", + vim.log.levels.WARN + ) local has_tree_sitter_cli = vim.fn.executable "tree-sitter" == 1 and vim.fn.executable "node" == 1 return vim.tbl_filter(function(lang) return M.list[lang].maintainers |
