[macOS host + Linux remote] Restoring a remote session doesn't load project-local language server init options properly
Summary
When Zed is quit with a remote session and then re-launched, it brings up the remote session and language server but seemingly doesn't respect project-local configs that impact the language server behavior.
Description
I've noticed this with both Rust Analyzer, and Lua Language Server. With RA, it doesn't respect my settings in rust-analyzer.initialization_options. In particular, I have analyzerTargetDir set here to be different than the workspace target so that Zed and my CLI don't share the same package lock.
When I quit Zed with the window for the project still open, the next time I launch Zed, it's using <project root>/target instead of the directory I specified the project-local .zed directory. The only way to get it unstuck is:
- Close the project but don't completely quit
Zed(this implies macOS), - Kill the zed proxy/server on the remote
- Open the project from the project selector
With Lua Language Server, it doesn't respect the .luarc.json in the project root. I have to take the same steps to resolve it.
Steps to reproduce:
- Set the config
"restore_on_startup": "last_session" - Open a remote project
- Set a project-local LSP option in the remote project root's
.zeddirectory - Quit Zed without exiting the session
- Re-launch Zed
Expected Behavior: Configs should be respected no matter how the project is launched Actual Behavior: Project-local configs are seemingly ignored in this configuration
Zed Version and System Specs
Zed: v0.184.9 (Zed) OS: macOS 15.3.1 Memory: 32 GiB Architecture: x86_64
Ah! Thank you for looking into it! It was driving me mad!
FYI, i fixed it by adding an empty .editorconfig file at the root of my project and then it just worked
It seems I also have to edit/save the .zed/settings.json and it works again
What is super weird is that it works sometimes
Actually, just saving the remote .zed/settings.json fixes it right away without restart
Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!
This was enough friction that I had switched back to other IDEs for remote dev for a while, but with the bot's stale prompt, I investigated and this seems resolved. Thanks!