mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
feat(install): allow ignore list when installing parsers (#1098)
This commit is contained in:
parent
09045354c0
commit
7984975a2f
5 changed files with 53 additions and 7 deletions
|
|
@ -10,6 +10,7 @@ local M = {}
|
|||
local config = {
|
||||
modules = {},
|
||||
ensure_installed = {},
|
||||
ignore_install = {},
|
||||
update_strategy = 'lockfile',
|
||||
}
|
||||
-- List of modules that need to be setup on initialization.
|
||||
|
|
@ -271,6 +272,7 @@ end
|
|||
-- @param user_data module overrides
|
||||
function M.setup(user_data)
|
||||
config.modules = vim.tbl_deep_extend('force', config.modules, user_data)
|
||||
config.ignore_install = user_data.ignore_install or {}
|
||||
|
||||
local ensure_installed = user_data.ensure_installed or {}
|
||||
if #ensure_installed > 0 then
|
||||
|
|
@ -412,4 +414,8 @@ function M.get_update_strategy()
|
|||
return config.update_strategy
|
||||
end
|
||||
|
||||
function M.get_ignored_parser_installs()
|
||||
return config.ignore_install or {}
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue