-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust Analyzer doesn't work with multiple subprojects #5108
Comments
by the way opening directly from surrounding directory works, for instance, navigating directly to sub directory and issuing a |
Thanks for the report. Can you explain this a bit further with a specific example? I don't understand how how the project file browser relates to syntax highlighting, and what exactly you're seeing. |
OK, i can't really show you my current work project, but for some reason I have a project path that looks like the following, when i hover over a directory from opening the
and if the the |
I believe I'm running into the same problem here, with language servers only working if a Cargo.toml or go.mod etc is found in the root of the project. Rust and Go aren't working when I open the root of the repo, but Rust is working as normal if I open the aoc2201 directory itself. Not sure on best practices for handling multiple language servers simultaneously, but this works in VS Code and IntelliJ, and I 100% prefer Zed 🤣 |
Noticed this issue has the Rust label, though it applies to Go as well, and may not be limited to those two. The issue is that Zed isn't loading LSPs without seeing appropriate files (i.e. To address this, Zed could recursively check each directory to see if it's a LSP-worthy project, or require project roots to be workspaces to handle nested projects. There might be a way to create virtual cargo/go workspaces without the user defining them, but that might be over-complicating things. Going to test to see if this is still present before trying to think on this more 🤔 |
Oh I've run into the issue again, but with the Zed extensions repo! Might be that one level of nesting works but not more. Going to open a PR to add a workspace file there to account for it. |
Hi there! 👋 |
Thanks for confirming it @eth0net ! I'll take a look in a near-ish term at improving this part of our LSP handling. |
Check for existing issues
Describe the bug / provide steps to reproduce it
Syntax highlight on nested sub projects from the file browser, does not syntax highlight (in Rust), other non-nested projects, syntax highlighting still works...
Expected behavior
Expect syntax highlighting, command clicking and all things to work no matter if its nested n levels deep.
Environment
echo$(zed --version) "\n"macOS $ (sw_vers -productVersion) "\n"architecture $(uname -m)
Zed 0.65.2 – /Applications/Zed.app
macOS 12.5.1
architecture arm6
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issueNo response
The text was updated successfully, but these errors were encountered: