From 412752130d52717860ec6dd426e9c02dbf1338ef Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Fri, 1 Oct 2021 20:33:55 +0200 Subject: [PATCH] docs(install): explain how to use a proxy for download --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 0089a6fea..415e8fdcb 100644 --- a/README.md +++ b/README.md @@ -480,3 +480,25 @@ To avoid these kind of errors, please use `setlocal` instead of `set` for the re This is because of `rtp` management in `nvim`, adding `packadd nvim-treesitter` should fix the issue. + +#### I want to use Git instead of curl for downloading the parsers + +In your Lua config: + +```lua +require("nvim-treesitter.install").prefer_git = true +``` + +#### I want to use a HTTP proxy for downloading the parsers + +You can either configure curl to use additional CLI arguments in your Lua config: +```lua +require("nvim-treesitter.install").command_extra_args = { + curl = { "--proxy", "" }, +} +``` +or you configure git via `.gitconfig` and use git instead of curl + +```lua +require("nvim-treesitter.install").prefer_git = true +```