mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
configs: actually enable and disable on setup
This commit is contained in:
parent
5a7579c8f5
commit
0a1353e8aa
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue