prefer using git to download treesitter's parser

This commit is contained in:
leafee98 2023-07-08 16:20:31 +08:00
parent dce111ff7f
commit 2eccf9737c

View file

@ -52,7 +52,7 @@ end
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
main = "nvim-treesitter.configs", name = "nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
opts = { opts = {
indent = { enable = true }, indent = { enable = true },
@ -61,4 +61,8 @@ return {
auto_install = true, auto_install = true,
sync_install = false, sync_install = false,
}, },
config = function (this, opts)
require(this.name .. ".configs").setup(opts);
require(this.name .. ".install").prefer_git = true;
end
} }