feat(install): allow ignore list when installing parsers (#1098)

This commit is contained in:
Steven Sojka 2021-03-24 09:12:03 -05:00 committed by GitHub
parent 09045354c0
commit 7984975a2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 7 deletions

View file

@ -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