Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Follow-up on #18447: Unintentional deletion during merge-conflicts resolution (#20991)

张小白9211e699eef9
diff --git a/crates/languages/src/go.rs b/crates/languages/src/go.rs
index 64583ad61f3..b3073d7eaa9 100644
--- a/crates/languages/src/go.rs
+++ b/crates/languages/src/go.rs
@@ -139,7 +139,8 @@ impl super::LspAdapter for GoLspAdapter {
let gobin_dir = container_dir.join("gobin");
fs::create_dir_all(&gobin_dir).await?;
- let install_output = util::command::new_smol_command("go")
+ let go = delegate.which("go".as_ref()).await.unwrap_or("go".into());
+ let install_output = util::command::new_smol_command(go)
.env("GO111MODULE", "on")
.env("GOBIN", &gobin_dir)
.args(["install", "golang.org/x/tools/gopls@latest"])