aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/core/clients/github.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/core/clients/github.lua')
-rw-r--r--lua/nvim-lsp-installer/core/clients/github.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/lua/nvim-lsp-installer/core/clients/github.lua b/lua/nvim-lsp-installer/core/clients/github.lua
index 080edbb0..27352e8d 100644
--- a/lua/nvim-lsp-installer/core/clients/github.lua
+++ b/lua/nvim-lsp-installer/core/clients/github.lua
@@ -19,7 +19,12 @@ function M.fetch_releases(repo, callback)
return callback("Failed to fetch GitHub releases.", nil)
end
callback(nil, vim.json.decode(response))
- end)
+ end, {
+ custom_fetcher = {
+ cmd = "gh",
+ args = { "api", ("repos/%s/releases"):format(repo) },
+ },
+ })
end
---@alias FetchLatestGithubReleaseOpts {tag_name_pattern:string}
@@ -62,7 +67,12 @@ function M.fetch_tags(repo, callback)
return callback("Failed to fetch tags.", nil)
end
callback(nil, vim.json.decode(response))
- end)
+ end, {
+ custom_fetcher = {
+ cmd = "gh",
+ args = { "api", ("repos/%s/tags"):format(repo) },
+ },
+ })
end
---@param repo string The GitHub repo ("username/repo").