aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-09-22 20:57:49 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2020-09-22 21:27:24 +0200
commit0643fa300375263cc41a44bf2b46f4dace8e54bd (patch)
tree66a2d5c7dbdcf59bc49a9b8aea9db0488e3150c4
parentPython locals: account for https://github.com/tree-sitter/tree-sitter-python/... (diff)
downloadnvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.tar
nvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.tar.gz
nvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.tar.bz2
nvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.tar.lz
nvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.tar.xz
nvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.tar.zst
nvim-treesitter-0643fa300375263cc41a44bf2b46f4dace8e54bd.zip
feat(parsers): add possibility to install from other branches
More and more Github repos are switching to "main" branch. Example: `tree-sitter-wasm`
-rw-r--r--lua/nvim-treesitter/install.lua9
1 files changed, 8 insertions, 1 deletions
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,
},
},