diff options
| author | William Boman <william@redwill.se> | 2022-07-08 17:36:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-08 17:36:10 +0200 |
| commit | 8cad2361dd63c67d95acf9f79321927b03843959 (patch) | |
| tree | 951599a91b56cc5be5220fe645e0c5323d21ae83 /lua/mason-registry/bicep-lsp | |
| parent | fix(ui): read from correct path in the receipt to gather linked bins (#26) (diff) | |
| download | mason-8cad2361dd63c67d95acf9f79321927b03843959.tar mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.gz mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.bz2 mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.lz mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.xz mason-8cad2361dd63c67d95acf9f79321927b03843959.tar.zst mason-8cad2361dd63c67d95acf9f79321927b03843959.zip | |
refactor: move packages to mason-registry (#27)
Diffstat (limited to 'lua/mason-registry/bicep-lsp')
| -rw-r--r-- | lua/mason-registry/bicep-lsp/init.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lua/mason-registry/bicep-lsp/init.lua b/lua/mason-registry/bicep-lsp/init.lua new file mode 100644 index 00000000..0e1eff44 --- /dev/null +++ b/lua/mason-registry/bicep-lsp/init.lua @@ -0,0 +1,31 @@ +local Pkg = require "mason.core.package" +local path = require "mason.core.path" +local std = require "mason.core.managers.std" +local github = require "mason.core.managers.github" + +return Pkg.new { + name = "bicep-lsp", + desc = [[Bicep is a declarative language for describing and deploying Azure resources]], + homepage = "https://github.com/Azure/bicep", + languages = { Pkg.Lang.Bicep }, + categories = { Pkg.Cat.LSP }, + ---@async + ---@param ctx InstallContext + install = function(ctx) + std.ensure_executable("dotnet", { help_url = "https://dotnet.microsoft.com/download" }) + ctx.fs:mkdir "vscode" + ctx:chdir("vscode", function() + -- The bicep-langserver.zip is a bit broken on POSIX systems - so we download it via the VSCode distribution + -- instead. See https://github.com/Azure/bicep/issues/3704. + github + .unzip_release_file({ + repo = "Azure/bicep", + asset_file = "vscode-bicep.vsix", + }) + .with_receipt() + end) + ctx.fs:rename(path.concat { "vscode", "extension", "bicepLanguageServer" }, "langserver") + ctx.fs:rmrf "vscode" + ctx:chdir "langserver" + end, +} |
