zed2-backport: Elixir next ls bad cpu type (#3185)

This commit is contained in:
Piotr Osiewicz 2023-10-30 18:44:47 +01:00 committed by GitHub
commit 510ab60bd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -967,7 +967,6 @@ impl CompletionsMenu {
self.selected_item -= 1;
} else {
self.selected_item = self.matches.len() - 1;
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
}
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
self.attempt_resolve_selected_completion_documentation(project, cx);
@ -1538,7 +1537,6 @@ impl CodeActionsMenu {
self.selected_item -= 1;
} else {
self.selected_item = self.actions.len() - 1;
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
}
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
cx.notify();
@ -1547,11 +1545,10 @@ impl CodeActionsMenu {
fn select_next(&mut self, cx: &mut ViewContext<Editor>) {
if self.selected_item + 1 < self.actions.len() {
self.selected_item += 1;
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
} else {
self.selected_item = 0;
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
}
self.list.scroll_to(ScrollTarget::Show(self.selected_item));
cx.notify();
}

View file

@ -321,8 +321,8 @@ impl LspAdapter for NextLspAdapter {
latest_github_release("elixir-tools/next-ls", false, delegate.http_client()).await?;
let version = release.name.clone();
let platform = match consts::ARCH {
"x86_64" => "darwin_arm64",
"aarch64" => "darwin_amd64",
"x86_64" => "darwin_amd64",
"aarch64" => "darwin_arm64",
other => bail!("Running on unsupported platform: {other}"),
};
let asset_name = format!("next_ls_{}", platform);