From 2eccf9737cc371e1aea6060852ca67c464f8257a Mon Sep 17 00:00:00 2001 From: leafee98 Date: Sat, 8 Jul 2023 16:20:31 +0800 Subject: [PATCH] prefer using git to download treesitter's parser --- lua/plugins/20-treesitter.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/plugins/20-treesitter.lua b/lua/plugins/20-treesitter.lua index 2416874..cb86db3 100644 --- a/lua/plugins/20-treesitter.lua +++ b/lua/plugins/20-treesitter.lua @@ -52,8 +52,8 @@ end return { "nvim-treesitter/nvim-treesitter", - main = "nvim-treesitter.configs", - build = ":TSUpdate", + name = "nvim-treesitter", + build = ":TSUpdate", opts = { indent = { enable = true }, highlight = { enable = true }, @@ -61,4 +61,8 @@ return { auto_install = true, sync_install = false, }, + config = function (this, opts) + require(this.name .. ".configs").setup(opts); + require(this.name .. ".install").prefer_git = true; + end }