Download right language server binary for OS (#8040)
Release Notes: - Download right language server binary for OS
This commit is contained in:
parent
3ef8a9910d
commit
4616d66e1d
8 changed files with 63 additions and 17 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue