Use textDocument/codeLens data in the actions menu when applicable #2 #26848
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-applies what's been reverted in #26832 with an action-related fix in 64b5d37
Before, actions were resolved only if
data
is present and either of the possible fields is empty:zed/crates/project/src/lsp_store.rs
Lines 1632 to 1633 in e842b4e
But Zed resolves completions and inlays once, unconditionally, and the reverted PR applied the same strategy to actions.
That did not work despite the spec not forbidding
data
-less actions to be resolved.Soon, it starts to work due to rust-lang/rust-analyzer#19369 but it seems safer to restore the original filtering code.
Code lens have no issues with
data
-less resolves:https://github.com/rust-lang/rust-analyzer/blob/220d913cbcd05f9b7635179a98c685f31821a572/crates/rust-analyzer/src/handlers/request.rs#L1618-L1620
so the same approach as completions and inlays is kept: resolve once.
Release Notes: