From bc25a6a5c4fd659bbf78ba0a2442ecf14eb00398 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 16 Apr 2022 11:41:00 +0200 Subject: chore!: remove ensure_installed='maintained' Removes all support (and tests) for the parser category "maintained", as this is no longer a useful category. BREAKING CHANGE: replace `ensure_installed='maintained'` by an explicit list of parsers, or use `'all'` (not recommended). --- lua/nvim-treesitter/install.lua | 11 +---------- lua/nvim-treesitter/parsers.lua | 13 ------------- 2 files changed, 1 insertion(+), 23 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index b65c4b3f0..10f08dace 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -402,9 +402,6 @@ local function install(options) if ... == "all" then languages = parsers.available_parsers() ask = false - elseif ... == "maintained" then - languages = parsers.maintained_parsers() - ask = false else languages = vim.tbl_flatten { ... } ask = ask_reinstall @@ -467,15 +464,9 @@ function M.uninstall(...) path_sep = "\\" end - if vim.tbl_contains({ "all", "maintained" }, ...) then + if vim.tbl_contains({ "all" }, ...) then reset_progress_counter() local installed = info.installed_parsers() - if ... == "maintained" then - local maintained = parsers.maintained_parsers() - installed = vim.tbl_filter(function(l) - return vim.tbl_contains(maintained, l) - end, installed) - end for _, langitem in pairs(installed) do M.uninstall(langitem) end diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 4ac58758d..4a0e5208b 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1085,19 +1085,6 @@ function M.available_parsers() end 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 - and not M.list[lang].experimental - and (has_tree_sitter_cli or not M.list[lang].install_info.requires_generate_from_grammar) - end, M.available_parsers()) -end - function M.get_parser_configs() return M.list end -- cgit v1.2.3-70-g09d2