Download right language server binary for OS (#8040)

Release Notes:

- Download right language server binary for OS
This commit is contained in:
bbb651 2024-02-19 23:53:03 -08:00 committed by GitHub
parent 3ef8a9910d
commit 4616d66e1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 63 additions and 17 deletions

View file

@ -30,6 +30,12 @@ impl super::LspAdapter for LuaLspAdapter {
&self,
delegate: &dyn LspAdapterDelegate,
) -> Result<Box<dyn 'static + Send + Any>> {
let os = match consts::OS {
"macos" => "darwin",
"linux" => "linux",
"windows" => "win32",
other => bail!("Running on unsupported os: {other}"),
};
let platform = match consts::ARCH {
"x86_64" => "x64",
"aarch64" => "arm64",
@ -43,7 +49,7 @@ impl super::LspAdapter for LuaLspAdapter {
)
.await?;
let version = &release.tag_name;
let asset_name = format!("lua-language-server-{version}-darwin-{platform}.tar.gz");
let asset_name = format!("lua-language-server-{version}-{os}-{platform}.tar.gz");
let asset = release
.assets
.iter()