aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/core/receipt.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-05-01 15:02:43 +0200
committerGitHub <noreply@github.com>2022-05-01 15:02:43 +0200
commit52d8f78fd1c1657f58115adc1928763571ffc7fa (patch)
tree0eb4ab1657980b7fc425c75d3d1920e5a345d545 /lua/nvim-lsp-installer/core/receipt.lua
parentfeat: allow excluding servers from automatic installation (#643) (diff)
downloadmason-52d8f78fd1c1657f58115adc1928763571ffc7fa.tar
mason-52d8f78fd1c1657f58115adc1928763571ffc7fa.tar.gz
mason-52d8f78fd1c1657f58115adc1928763571ffc7fa.tar.bz2
mason-52d8f78fd1c1657f58115adc1928763571ffc7fa.tar.lz
mason-52d8f78fd1c1657f58115adc1928763571ffc7fa.tar.xz
mason-52d8f78fd1c1657f58115adc1928763571ffc7fa.tar.zst
mason-52d8f78fd1c1657f58115adc1928763571ffc7fa.zip
feat(receipt): add "github_release" type (#650)
This is for sources that uses GitHub releases, but doesn't target a specific asset file (as opposed to the github_release_file source).
Diffstat (limited to 'lua/nvim-lsp-installer/core/receipt.lua')
-rw-r--r--lua/nvim-lsp-installer/core/receipt.lua22
1 files changed, 1 insertions, 21 deletions
diff --git a/lua/nvim-lsp-installer/core/receipt.lua b/lua/nvim-lsp-installer/core/receipt.lua
index 21600eae..4517256a 100644
--- a/lua/nvim-lsp-installer/core/receipt.lua
+++ b/lua/nvim-lsp-installer/core/receipt.lua
@@ -18,6 +18,7 @@ local M = {}
---| '"jdtls"'
---| '"git"'
---| '"github_tag"'
+---| '"github_release"'
---| '"github_release_file"'
---@alias InstallReceiptSource {type: InstallReceiptSourceType}
@@ -135,27 +136,6 @@ function InstallReceiptBuilder.git_remote(remote_url)
return { type = "git", remote = remote_url }
end
----@param ctx ServerInstallContext
----@param opts FetchLatestGithubReleaseOpts|nil
-function InstallReceiptBuilder.github_release_file(ctx, opts)
- opts = opts or {}
- return {
- type = "github_release_file",
- repo = ctx.github_repo,
- file = ctx.github_release_file,
- release = ctx.requested_server_version,
- tag_name_pattern = opts.tag_name_pattern,
- }
-end
-
-function InstallReceiptBuilder.github_tag(ctx)
- return {
- type = "github_tag",
- repo = ctx.github_repo,
- tag = ctx.requested_server_version,
- }
-end
-
---@class InstallReceipt
---@field public name string
---@field public schema_version InstallReceiptSchemaVersion