Merge pull request #273 from vigoux/fix-enable-disable

configs: actually enable and disable on setup
This commit is contained in:
Steven Sojka 2020-08-10 15:10:34 -05:00 committed by GitHub
commit 47a4eadf44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,6 +278,16 @@ function M.setup(user_data)
require'nvim-treesitter.install'.ensure_installed(data)
else
config.modules[name] = vim.tbl_deep_extend('force', config.modules[name] or {}, data)
recurse_modules(function(mod_name)
if data.enable then
enable_all(mod_name)
end
for _, lang in ipairs(data.disable or {}) do
disable_mod_conf_autocmd(mod_name, lang)
end
end, config.modules)
end
end
end