fix(config)!: always install parsers bundled with nvim

This commit is contained in:
Christian Clason 2024-01-10 18:25:34 +01:00
parent 842507a578
commit fe89bf1719

View file

@ -20,7 +20,7 @@ local M = {}
local config = {
modules = {},
sync_install = false,
ensure_installed = {},
ensure_installed = { "lua", "query", "vimdoc", "vim", "c", "python", "bash", "markdown", "markdown_inline" },
auto_install = false,
ignore_install = {},
parser_install_dir = nil,
@ -421,6 +421,7 @@ function M.setup(user_data)
end
local ensure_installed = user_data.ensure_installed or {}
vim.list_extend(ensure_installed, config.ensure_installed)
if #ensure_installed > 0 then
if user_data.sync_install then
require("nvim-treesitter.install").ensure_installed_sync(ensure_installed)