Could not install the Go language server 'gopls', because 'Go' was not found
Summary
Zed cannot correctly detect or launch existing system gopls despite valid Go and gopls installations.
Description
Even when Go and gopls are fully installed, configured, and verified working inside Zed's own terminal shell, Zed fails with the error:
Could not install the Go language server "gopls", because "Go" was not found.
However:
-
go versionworks correctly inside Zed. -
gopls versionworks correctly inside Zed. -
goplsis correctly installed and executable (Mach-O arm64). - Manual override in
settings.jsonstill fails. - No LSP connection logs are created (
Developer: Show LSP Logsis empty).
It appears Zed incorrectly sets environment variables or fails to correctly launch language servers using custom environment paths.
Steps to reproduce:
- Install Go manually under a custom
$GOROOT(e.g.,$HOME/go/go-installation) and set$GOROOT,$GOPATHin.zshrc. - Install
goplsmanually:go install golang.org/x/tools/gopls@latest - Confirm in Zed’s
Shell: Open in Terminalthat bothgo versionandgopls versionwork. - Add to
settings.json:
"lsp": {
"gopls": {
"command": "/Users/Arkadiy.Dymkov/go/bin/gopls",
"initialization_options": {
"usePlaceholders": true,
"completeUnimported": true
}
}
}
- Restart Zed and open any .go file.
Expected Behavior:
- Zed detects the manually installed gopls and connects normally.
- LSP features (autocomplete, hover, go-to-definition) work.
Actual Behavior:
- Zed shows startup error: "Could not install the Go language server 'gopls', because 'Go' was not found."
- No LSP logs are created.
Manual gopls command works outside of Zed.
Additional: ZED settongs.json:
{
"languages": {
"Go": {
"language_servers": ["gopls"],
"format_on_save": "on",
"code_actions_on_format": {
"source.organizeImports": true
}
}
},
"lsp": {
"gopls": {
"command": "/Users/Arkadiy.Dymkov/go/bin/gopls",
"initialization_options": {
"usePlaceholders": true,
"completeUnimported": true,
"experimentalPostfixCompletions": true,
"hints": {
"assignVariableTypes": false,
"compositeLiteralFields": false,
"compositeLiteralTypes": false,
"constantValues": true,
"functionTypeParameters": true,
"parameterNames": true,
"rangeVariableTypes": true
}
}
}
},
"project_panel": {
"dock": "right"
},
"assistant": {
"dock": "left",
"default_model": {
"provider": "zed.dev",
"model": "claude-3-7-sonnet-thinking-latest"
},
"version": "2"
},
"theme": {
"mode": "system",
"light": "One Light",
"dark": "Tomorrow Dark"
}
}
zed $ which go
/Users/Arkadiy.Dymkov/go/go-installation/bin/go
zed $ go version
go version go1.24.2 darwin/arm64
zed $ which gopls
/Users/Arkadiy.Dymkov/go/bin/gopls
zed $ gopls version
golang.org/x/tools/gopls v0.18.1
Zed Version and System Specs
Zed: v0.183.11 (Zed) OS: macOS 15.3.2 Memory: 32 GiB Architecture: aarch64
Also i started to recieve
Error loading workspace folders (expected 1, got 0)
failed to load view for file:///Users/Arkadiy.Dymkov/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go: err: fork/exec /Users/Arkadiy.Dymkov/go/go-installation/bin/go: not a directory: stderr:
Thanks for reporting. Likely the same issue as #25404 and likely caused by #22575
Are you launching Zed via the app menu or via the command line?
Hey, @probably-neb! Via app menu
When I start zed as app the error occurs again. Without error when starting the zed cli. Possible merged PR https://github.com/zed-industries/zed/pull/31799
2025-06-04T13:30:42+02:00 ERROR [zed] login shell exited with exit status: 1. stdout: "", stderr: "bash: Kann die Prozessgruppe des Terminals nicht setzen (-1).: Unpassender IOCTL (I/O-Control) für das Gerät\nbash: Keine Jobsteuerung in dieser Shell\nbash: /tmp/.tmpcxlSJ4: Kann existierende Datei nicht überschreiben.\n"
2025-06-04T13:30:43+02:00 WARN [home] login shell exited with exit status: 1. stdout: "", stderr: "bash: Kann die Prozessgruppe des Terminals nicht setzen (-1).: Unpassender IOCTL (I/O-Control) für das Gerät\nbash: Keine Jobsteuerung in dieser Shell\nbash: /tmp/.tmpesSie1: Kann existierende Datei nicht überschreiben.\n"
2025-06-04T13:30:43+02:00 ERROR [project::environment] Failed to load environment variables. See log for details
Yep, please once you've updated to v0.190.4 let us know if the issue is resolved!
Yep, please once you've updated to v0.190.4 let us know if the issue is resolved!
Not resolved. See also https://github.com/zed-industries/zed/issues/32445#issuecomment-2963534903
Zed: v0.191.0 (Zed Dev 6d9bcdb2af603e1a3eee2531b1721550322d8f8d) OS: Linux Wayland ubuntu 24.04 Memory: 30.7 GiB Architecture: x86_64 GPU: AMD Radeon Graphics (RADV RENOIR) || radv || Mesa 24.2.8-1ubuntu1~24.04.1
Hi, using Zed v0.191.4 and the problem still remains.
Zed: v0.191.4 (Zed) OS: Linux Wayland ubuntu 22.04 Memory: 31 GiB Architecture: x86_64 GPU: Intel(R) Graphics (RPL-U) || Intel open-source Mesa driver || Mesa 23.2.1-1ubuntu3.1~22.04.3
Hi, using Zed v0.191.4 and the problem still remains.
Zed: v0.191.4 (Zed) OS: Linux Wayland ubuntu 22.04 Memory: 31 GiB Architecture: x86_64 GPU: Intel(R) Graphics (RPL-U) || Intel open-source Mesa driver || Mesa 23.2.1-1ubuntu3.1~22.04.3
It's solved with 0.192.x https://zed.dev/releases/preview/0.192.0
observed at windows scoop zed-nightly
Zed: v0.194.0 (Zed Dev dfdeb1bf512bfbb446e48e70c48bb23210ee37ab) OS: Windows 10.0.26100 Memory: 15.7 GiB Architecture: x86_64 GPU: Intel(R) Iris(R) Xe Graphics || Intel Corporation || Intel driver
Same error for 0.200.4 55ffbb43c8cdec2d923954fddf4a75cc771c26e2
Can you confirm that both go and gopls are on the path in the Zed terminal @soyayaos and @chanmaoganda?
@probably-neb After updating Ubuntu packages and Zed version to 0.200.5 the problem is gone.
Ok, I'm going to close this then. Feel free to open new issues or comment on this one and we can reopen if the issue keeps happening
Same problem: Zed: v0.210.0 (Zed Nightly 6c3a7f6ddb9746ed36c8b1397b5c63a6dd2f8a92) OS: Windows 10.0.26100 Memory: 31.6 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 4050 Laptop GPU || NVIDIA Corporation || 555.97 r555_00
go version
go version go1.24.3 windows/amd64
gopls version
golang.org/x/tools/gopls v0.20.0
this must be a windows specific issue, those who use linux perhaps may not encounter this issue
my arch works perfect on zed with go
It works now, but I had to reinstall Zed