Re-add prefer-git option

This commit is contained in:
Nicholas Hansen 2025-12-06 12:34:55 +00:00
parent 75797cdd8a
commit 5c3fc1e61f
No known key found for this signature in database
3 changed files with 141 additions and 15 deletions

View file

@ -17,10 +17,12 @@ for i = 1, #_G.arg do
end
vim.opt.runtimepath:append('.')
local ts = require('nvim-treesitter')
ts.setup({ prefer_git = true })
---@type async.Task
local task = update and require('nvim-treesitter').update('all', { summary = true })
or require('nvim-treesitter').install(
local task = update and ts.update('all', { summary = true })
or ts.install(
#parsers > 0 and parsers or 'all',
{ force = true, summary = true, generate = generate, max_jobs = max_jobs }
)