aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/bicep/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-11-30 13:34:09 +0100
committerGitHub <noreply@github.com>2021-11-30 13:34:09 +0100
commit2ab810f9eaf43d4f10dea50ab35b5dac34f480cf (patch)
tree6e26a51cde8e674648d747dd59328d7a91c25b8b /lua/nvim-lsp-installer/servers/bicep/init.lua
parentAdded some clarity to eslint readme (#282) (diff)
downloadmason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.tar
mason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.tar.gz
mason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.tar.bz2
mason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.tar.lz
mason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.tar.xz
mason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.tar.zst
mason-2ab810f9eaf43d4f10dea50ab35b5dac34f480cf.zip
fix(bicep): download the langserver via the vscode distribution (#286)
This is done to avoid issues with unzipping the bicep-langserver.zip on POSIX systems (see https://github.com/Azure/bicep/issues/3704).
Diffstat (limited to 'lua/nvim-lsp-installer/servers/bicep/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/bicep/init.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/lua/nvim-lsp-installer/servers/bicep/init.lua b/lua/nvim-lsp-installer/servers/bicep/init.lua
index 79672150..7fb92f1c 100644
--- a/lua/nvim-lsp-installer/servers/bicep/init.lua
+++ b/lua/nvim-lsp-installer/servers/bicep/init.lua
@@ -13,9 +13,16 @@ return function(name, root_dir)
std.ensure_executables {
{ "dotnet", "dotnet is required to run the bicep language server." },
},
- context.use_github_release_file("Azure/bicep", "bicep-langserver.zip"),
+ -- 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.
+ context.use_github_release_file("Azure/bicep", "vscode-bicep.vsix"),
context.capture(function(ctx)
- return std.unzip_remote(ctx.github_release_file)
+ return std.unzip_remote(ctx.github_release_file, "vscode")
+ end),
+ std.rename(path.concat { "vscode", "extension", "bicepLanguageServer" }, "langserver"),
+ std.rmrf "vscode",
+ context.set(function(ctx)
+ ctx.install_dir = path.concat { ctx.install_dir, "langserver" }
end),
},
default_options = {