mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
Merge pull request #273 from vigoux/fix-enable-disable
configs: actually enable and disable on setup
This commit is contained in:
commit
47a4eadf44
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)
|
require'nvim-treesitter.install'.ensure_installed(data)
|
||||||
else
|
else
|
||||||
config.modules[name] = vim.tbl_deep_extend('force', config.modules[name] or {}, data)
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue