-
Notifications
You must be signed in to change notification settings - Fork 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
WIP: Add support for detecting tests in source files, and implement it for Rust #10873
Conversation
A question/food for thought: will all of the tests show up in a task modal? |
Hi! Sorry for butting in (asking since I'm a maintainer on rust-analyzer and I use Zed...), but would it be possible to use rust-analyzer's runnable functionality instead, by any chance? (We'll be changing to extend support for non-Cargo build systems in rust-lang/rust-analyzer#16840, but we don't expect to change the custom LSP request beyond what's in that PR.) |
Hey, |
Thanks! I read through that, I appreciate you linking to your thinking on the matter! Obviously, y'all are the maintainers, but I'm curious as to how feasible it'd be to take a treesitter-based approach for all languages as a baseline and enhance specific languages (such as Rust) with LSP extensions. The benefit of LSP-based tasks would be more accurate task generation because rust-analyzer is able to see through macro expansions and whatnot. From an implementation standpoint, I think there might be some complications around scaling this approach/figuring out how it interacts with Zed's extension API, but for rust-analyzer at least, I'd be happy to send PRs to Zed each time that request corresponding to runnables changes (the PR I linked to would be first change in 3-4 years, fwiw). I don't expect much would change on the Zed side of things, since I think the task templates y'all have are sufficiently flexible. I think the integration boils down to mapping the right fields in the runnable response to the pre-existing task template in Zed. |
That's where I'm thinking we'll end up :D We'd love support on maintaining experimental API protocols like this :) @davidbarsky |
That's great to hear! I wasn't sure how open y'all would be to that, but I'm very happy you are! I'll keep my eyes peeled on opportunities for changes that make that possible. |
5be7c3d
to
4e2f911
Compare
Restore live updating language queries
Co-authored-by: Mikayla <mikayla@zed.dev>
eb6f0f0
to
4abd55d
Compare
Closing this in favor of #11195 |
TODO:
Release Notes: