zed
zed copied to clipboard
Zed Preview 0.148.0 Goto-definition goes nowhere
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
Updated to the latest Zed preview (0.148.0). Goto-definition, implementation etc no longer respond. I've tried disabling vim-mode, restarting the editor and the language servers, and nothing happens when I run goto-definition.
I've checked in the latest stable release and the issue is not present. goto-definition works as expected. The language server is pyright.
Environment
Zed: v0.148.0 (Zed Preview) OS: macOS 14.6.0 Memory: 18 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
In vim mode, g d, g D, g y, etc. does nothing - it all stopped working.
Huh, this is really strange. I'm not actually able to reproduce it on v0.148.0. What happens when you delete the directory containing the pyright language server and restart Zed? It should redownload the language server, but not sure if that will help here or not.
~/Library/Application\ Support/Zed/languages/pyright/
I just deleted the pyright folder, restarted Zed preview, and I'm still seeing the same issue. I've looked through the LSP debug logs inside Zed, but I'm not seeing errors there. It looks like the language server isn't even seeing the goto-definition command.
This happens with TypeScript as well.
I'm also experiencing this with TypeScript on v0.147.2.
Edit: my zed.log file is filled with this:
2024-08-12T15:26:14.444241Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.453445Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.464222Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.478341Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.486762Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.500099Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.511976Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.715139Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:14.715521Z [ERROR] server shut down
2024-08-12T15:26:16.128447Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:16.128768Z [ERROR] server shut down
2024-08-12T15:26:16.206856Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:16.207184Z [ERROR] server shut down
2024-08-12T15:26:16.245235Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:16.245688Z [ERROR] server shut down
2024-08-12T15:26:16.324142Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:16.324487Z [ERROR] server shut down
2024-08-12T15:26:16.500195Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:16.50061Z [ERROR] server shut down
2024-08-12T15:26:16.569795Z [WARN] Generic lsp request to vtsls failed: server shut down
2024-08-12T15:26:16.570063Z [ERROR] server shut down
2024-08-12T15:26:16.817863Z [WARN] Generic lsp request to vtsls failed: server shut down
For TypeScript users, rm -rf ~/Library/Application\ Support/Zed/languages/vtsls and restarting Zed fixed it for me.
I am on fa51651d066edcd464c05e6430cca88e21719bbd Using Arch linux.
rm -rf ~/.local/share/zed/languages/vtsls/*
This is still broken.
Zed.log
2024-08-13T12:20:54.223147656-05:00 [INFO] Node runtime install_if_needed
2024-08-13T12:20:54.27175519-05:00 [WARN] unhandled capability registration: Registration { id: "668b0d5e-1e32-4577-b40a-e5f2c7535e08", method: "workspace/didChangeWorkspaceFolders", register_options: Some(Object {}) }
2024-08-13T12:20:54.771692446-05:00 [INFO] Initializing default prettier with plugins {}
2024-08-13T12:20:54.771721082-05:00 [WARN] no language server found matching 'biome'
2024-08-13T12:20:54.771742183-05:00 [WARN] no language server found matching 'vtsls'
2024-08-13T12:20:54.771762422-05:00 [INFO] starting language servers for Markdown: markdown-oxide
2024-08-13T12:20:54.771781118-05:00 [INFO] starting language server "markdown-oxide", path: "/home/admin/Coding/Hexagon/GenHexDrStrange", id: 5
2024-08-13T12:20:55.551916393-05:00 [INFO] downloading language server "vtsls"
2024-08-13T12:20:55.552075212-05:00 [INFO] Node runtime install_if_needed
2024-08-13T12:20:56.149578165-05:00 [INFO] starting language server. binary path: "/home/admin/.local/share/zed/extensions/work/markdown-oxide/markdown-oxide-v0.23.1/markdown-oxide-v0.23.1-x86_64-unknown-linux-gnu/markdown-oxide", working directory: "/home/admin/Coding/Hexagon/GenHexDrStrange", args: []
2024-08-13T12:21:02.7595069-05:00 [INFO] Node runtime install_if_needed
2024-08-13T12:21:02.988806575-05:00 [INFO] starting language server. binary path: "/home/admin/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node", working directory: "/home/admin/Coding/Hexagon/GenHexDrStrange", args: ["/home/admin/.local/share/zed/languages/vtsls/node_modules/@vtsls/language-server/bin/vtsls.js", "--stdio"]
2024-08-13T12:26:39.868638238-05:00 [INFO] Initializing default prettier with plugins {}
2024-08-13T12:26:39.868709357-05:00 [INFO] starting language servers for TSX: biome, vtsls, tailwindcss-language-server
2024-08-13T12:26:39.886141112-05:00 [INFO] Creating a descriptor pool for at most 4096 sets
2024-08-13T12:26:39.895983104-05:00 [INFO] Creating a descriptor pool for at most 4096 sets
And they launched a new stable version with this issue. There is no fix yet. It's very unusable for me, as I really use the goto definition feature a lot.
Edit: After deleting everything from Zed and reinstalling, it started working again. I'm not sure what was broken. Btw I'm using the same settings.json as before.
@christian-gama What did you delete? My stable zed install just updated and I'm still seeing the same issue.
@christian-gama What did you delete? My stable zed install just updated and I'm still seeing the same issue.
Here is what I did:
- Backup settings.json
- Override settings.json with an empty {}
- Logout from Zed
- Uninstall all extensions
- rm -rf ~/Library/Application\ Support/Zed/
- rm -rf ~/Library/Logs/Zed/
- Remove Zed Application
- Reinstall Zed 0.148.0
- Copy back previous settings.json
Huh, yup that also worked for me. I've backed up the Zed.log file in case that proves useful.
Thanks @christian-gama!
That did not work for me, what worked for me was:
settings.json commenting out biome, which was fine before.
"language_servers": [
"!eslint",
"!prettier",
"!typescript-language-server",
// "biome",
"vtsls",
"..."
],
I just found out that the Biome extensions was causing the issue. Installing the extension made the bug come back. Uninstalling instantly made the goto definition work properly again.
I'm not using biome and I'm having the same issue. Using Zed 0.148.1.
Gonna try reinstalling it.
I figured out when this happens, when there are typescript errors, then go to definition is not working using biome. When there are no errors, go to definitions works fine.
Same with Python and Zed 0.152.6 😢
Zed: v0.153.6 (Zed) OS: macOS 15.0.0 Memory: 36 GiB Architecture: aarch64
I'm working with Python and my problem was the order in which I specified my language servers:
{
"languages": {
"Python": {
"format_on_save": "on",
"language_servers": ["pyright", "ruff"]
// "language_servers": ["ruff", "pyright"] <-- BAD
},
"Markdown": {
"format_on_save": "on"
}
}
}
I'm working with Python and my problem was the order in which I specified my language servers:
{ "languages": { "Python": { "format_on_save": "on", "language_servers": ["pyright", "ruff"] // "language_servers": ["pyright", "ruff"] <-- BAD }, "Markdown": { "format_on_save": "on" } } }
I'm having the same issue with Python. And commenting out the language servers solved it!
I'm working with Python and my problem was the order in which I specified my language servers:
Same. Changing the order fixed it.
Hey all, a PR landed that allows actions that are not supported by one language server to "fall through" to the next configured one in the settings:
- https://github.com/zed-industries/zed/pull/25591
So I think the order no longer matters - ruff could be first now. I can't reproduce any issues when ruff is first. Closing out the issue, but feel free to open if you are still having other issues around python's go to def.