# Use textDocument/codeLens data in the actions menu when applicable \#2 \(\#26848\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8a31dcaeb09fbab0d6bbfd816a1256a0bcf056d1)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8a31dcaeb09fbab0d6bbfd816a1256a0bcf056d1

Requested commit: 8a31dcaeb09fbab0d6bbfd816a1256a0bcf056d1

Commit: 8a31dcaeb09fbab0d6bbfd816a1256a0bcf056d1

Tree: 410280b5938649c45be224885df861f0948a09c8

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Use textDocument/codeLens data in the actions menu when applicable #2 (#26848)

Re-applies what's been reverted in
https://github.com/zed-industries/zed/pull/26832 with an action-related
fix in
https://github.com/zed-industries/zed/commit/64b5d37d324176cc7b819418f46724cd4c67393d

Before, actions were resolved only if `data` is present and either of
the possible fields is empty:

https://github.com/zed-industries/zed/blob/e842b4eade368127f01944f1b442016edd6b292d/crates/project/src/lsp_store.rs#L1632-L1633

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
https://github.com/rust-lang/rust-analyzer/pull/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:

- N/A
```

## Parents

- [ef91e7afae47d6ec2b1169e7948be768d257d981](https://git.cafe/gitcafe/zed/commit/ef91e7afae47d6ec2b1169e7948be768d257d981?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8a31dcaeb09fbab0d6bbfd816a1256a0bcf056d1?format=markdown)
