[Update] bulk update
This commit is contained in:
@@ -34,6 +34,26 @@ return {
|
||||
"regex",
|
||||
},
|
||||
},
|
||||
-- On the main branch nothing acts on `ensure_installed` at startup: setup() takes only
|
||||
-- install_dir, and NvChad's :TSInstallAll (which does read this list off the lazy spec)
|
||||
-- only runs from `build`, i.e. when the plugin is installed or updated. So a language
|
||||
-- added here stayed uninstalled until the next rebuild — 9 of these 15 were missing,
|
||||
-- silently falling back to regex highlighting. Install whatever is absent, once, here.
|
||||
config = function(_, opts)
|
||||
local ts = require "nvim-treesitter"
|
||||
ts.setup()
|
||||
|
||||
local have = {}
|
||||
for _, lang in ipairs(ts.get_installed()) do
|
||||
have[lang] = true
|
||||
end
|
||||
local missing = vim.tbl_filter(function(lang)
|
||||
return not have[lang]
|
||||
end, opts.ensure_installed or {})
|
||||
if #missing > 0 then
|
||||
ts.install(missing) -- async; highlighting picks each up as it lands
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user