{"record":{"id":"25e0c7dc29334628","repo":"zed-industries/zed","slug":"could-not-install-the-go-language-server-gopls","errorCode":null,"errorMessage":"Could not install the Go language server `gopls`, because `go` was not found.","messagePattern":"Could not install the Go language server `gopls`, because `go` was not found\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/languages/src/go.rs","lineNumber":90,"sourceCode":"        delegate: &Arc<dyn LspAdapterDelegate>,\n        _: bool,\n        cx: &mut AsyncApp,\n    ) -> Result<Option<String>> {\n        static DID_SHOW_NOTIFICATION: AtomicBool = AtomicBool::new(false);\n\n        const NOTIFICATION_MESSAGE: &str =\n            \"Could not install the Go language server `gopls`, because `go` was not found.\";\n\n        if delegate.which(\"go\".as_ref()).await.is_none() {\n            if DID_SHOW_NOTIFICATION\n                .compare_exchange(false, true, SeqCst, SeqCst)\n                .is_ok()\n            {\n                cx.update(|cx| {\n                    delegate.show_notification(NOTIFICATION_MESSAGE, cx);\n                });\n            }\n            anyhow::bail!(\n                \"Could not install the Go language server `gopls`, because `go` was not found.\"\n            );\n        }\n\n        let release =\n            latest_github_release(\"golang/tools\", false, false, delegate.http_client()).await?;\n        let version: Option<String> = release.tag_name.strip_prefix(\"gopls/v\").map(str::to_string);\n        if version.is_none() {\n            log::warn!(\n                \"couldn't infer gopls version from GitHub release tag name '{}'\",\n                release.tag_name\n            );\n        }\n        Ok(version)\n    }\n\n    async fn check_if_user_installed(\n        &self,","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/languages/src/go.rs#L72-L108","documentation":"fetch_latest_server_version detects that the `go` toolchain is absent (delegate.which fails). Installing gopls requires `go install`, so a one-time notification is shown instead of attempting installation that would surely fail.","triggerScenarios":"Thrown at crates/languages/src/go.rs:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install Go (from go.dev or the system package manager) and ensure `go` is on PATH","Restart Zed after installing Go so the PATH is picked up","Install gopls manually (`go install golang.org/x/tools/gopls@latest`) and configure its binary path in settings"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}