# Add an action to expand Rust macros with rust-analyzer \(\#3580\) · gitcafe/zed

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

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

Visibility: public

Requested revision: cdf7c10b57b10c47823c4f0e57d473a0dde4d238

Requested commit: cdf7c10b57b10c47823c4f0e57d473a0dde4d238

Commit: cdf7c10b57b10c47823c4f0e57d473a0dde4d238

Tree: 2d36ecce999243e950c5c574bf9d2d6f78a4d972

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Add an action to expand Rust macros with rust-analyzer  (#3580)

Deals with https://github.com/zed-industries/community/issues/1282

If rust-analyzer responds with non-empty message, opens a new singleton
multibuffer with the expansion result:

![image](https://github.com/zed-industries/zed/assets/2690773/5f790ffd-1ad8-4f02-a60d-49ee0756362d)

In gpui2, only editors with excerpts containing Rust languages get the
action, in gpui1 every editor (even the *.ts one) has this action
enabled but it does nothing.

Release Notes:

- Added an `editor::ExpandMacroRecursively` command to expand Rust
macros with rust-analyzer.
```

## Parents

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

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

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