From 0643fa300375263cc41a44bf2b46f4dace8e54bd Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Tue, 22 Sep 2020 20:57:49 +0200 Subject: feat(parsers): add possibility to install from other branches More and more Github repos are switching to "main" branch. Example: `tree-sitter-wasm` --- lua/nvim-treesitter/install.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 3fbd74722..67a31a85a 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -147,7 +147,14 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync) info = 'Downloading...', err = 'Error during download, please verify your internet connection', opts = { - args = { 'clone', '--single-branch', '--branch', 'master', '--depth', '1', repo.url, project_name }, + args = { + 'clone', + '--single-branch', + '--branch', repo.branch or 'master', + '--depth', '1', + repo.url, + project_name + }, cwd = cache_folder, }, }, -- cgit v1.2.3-70-g09d2