fix(treesitter): dont add to ensure_installed when "all". Fixes #98

This commit is contained in:
Folke Lemaitre 2023-01-22 10:36:39 +01:00
parent ed554160bc
commit 280f4cf299
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 6 additions and 2 deletions

View file

@ -4,7 +4,9 @@ return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = function(_, opts) opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "json", "json5", "jsonc" }) if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "json", "json5", "jsonc" })
end
end, end,
}, },

View file

@ -4,7 +4,9 @@ return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = function(_, opts) opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "typescript", "tsx" }) if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "typescript", "tsx" })
end
end, end,
}, },