aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-05-15 09:45:28 +0200
committerChristian Clason <ch.clason+github@icloud.com>2025-05-16 08:48:27 +0200
commitb0a20057b0110952f22bc067720fe23887d5db32 (patch)
tree97eccf546bf34c5f2dd7caa4e788b3a18fc66039 /lua
parentfix(c,cpp,fsharp,idl,powershell,sql,systemtap): remove unneeded escapes (diff)
downloadnvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.tar
nvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.tar.gz
nvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.tar.bz2
nvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.tar.lz
nvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.tar.xz
nvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.tar.zst
nvim-treesitter-b0a20057b0110952f22bc067720fe23887d5db32.zip
feat(config)!: remove `ignore_install`
This was only useful for no longer supported `auto_install` option.
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/config.lua15
-rw-r--r--lua/nvim-treesitter/install.lua5
2 files changed, 3 insertions, 17 deletions
diff --git a/lua/nvim-treesitter/config.lua b/lua/nvim-treesitter/config.lua
index b7ffbf47c..8dcbdb37e 100644
--- a/lua/nvim-treesitter/config.lua
+++ b/lua/nvim-treesitter/config.lua
@@ -3,12 +3,10 @@ local M = {}
M.tiers = { 'stable', 'unstable', 'unmaintained', 'unsupported' }
---@class TSConfig
----@field ignore_install string[]
---@field install_dir string
---@type TSConfig
local config = {
- ignore_install = {},
install_dir = vim.fs.joinpath(vim.fn.stdpath('data'), 'site'),
}
@@ -92,7 +90,7 @@ end
---Normalize languages
---@param languages? string[]|string
----@param skip? { ignored: boolean, missing: boolean, unsupported: boolean, installed: boolean, dependencies: boolean }
+---@param skip? { missing: boolean, unsupported: boolean, installed: boolean, dependencies: boolean }
---@return string[]
function M.norm_languages(languages, skip)
if not languages then
@@ -110,17 +108,6 @@ function M.norm_languages(languages, skip)
languages = expand_tiers(languages)
- if skip and skip.ignored then
- local ignored = expand_tiers(config.ignore_install)
- languages = vim.tbl_filter(
- --- @param v string
- function(v)
- return not vim.list_contains(ignored, v)
- end,
- languages
- )
- end
-
if skip and skip.installed then
local installed = M.installed_parsers()
languages = vim.tbl_filter(
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua
index b36a7ddee..68f4c5ea4 100644
--- a/lua/nvim-treesitter/install.lua
+++ b/lua/nvim-treesitter/install.lua
@@ -439,7 +439,7 @@ end
---@param callback? fun(boolean)
M.install = a.sync(function(languages, options, callback)
reload_parsers()
- languages = config.norm_languages(languages, { ignored = true, unsupported = true })
+ languages = config.norm_languages(languages, { unsupported = true })
install(languages, options, callback)
end, 3)
@@ -451,8 +451,7 @@ M.update = a.sync(function(languages, _options, callback)
if not languages or #languages == 0 then
languages = 'all'
end
- languages =
- config.norm_languages(languages, { ignored = true, missing = true, unsupported = true })
+ languages = config.norm_languages(languages, { missing = true, unsupported = true })
languages = vim.tbl_filter(needs_update, languages) ---@type string[]
if #languages > 0 then