# rust: Nicer snippet completions \(\#43891\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 85619430957dc5d4aadf9ee45b7e3e09b011145c

Requested commit: 85619430957dc5d4aadf9ee45b7e3e09b011145c

Commit: 85619430957dc5d4aadf9ee45b7e3e09b011145c

Tree: add01874c63d53309bc88d9a9875bfaf8dd55e83

Author: Agus Zubiaga

Committer: GitHub

## Message

```
rust: Nicer snippet completions (#43891)

At some point, rust-analyzer started including the snippet expression
for some completions in the description field, but that can look like a
bug:

<img width="1570" height="578" alt="CleanShot 2025-11-27 at 20 39 49@2x"
src="https://github.com/user-attachments/assets/5a87c9fe-c0a8-472f-8d83-3bc9e9e00bbc"></img>


In these cases, we will now inline the tab stops as an ellipsis
character:

<img width="1544" height="428" alt="CleanShot 2025-12-01 at 10 01 18@2x"
src="https://github.com/user-attachments/assets/4c550891-4545-47cd-a295-a5eb07e78e92"></img>

You may also notice that we now syntax highlight the pattern closer to
what it looks like after accepted.

Alternatively, when the tab stop isn't just one position, it gets
highlighted as a selection since that's what it would do when accepted:

<img width="1558" height="314" alt="CleanShot 2025-12-01 at 10 04 37@2x"
src="https://github.com/user-attachments/assets/ce630ab2-da22-4072-a996-7b71ba21637d"
/>


Release Notes:

- rust: Display completion tab stops inline rather than as a raw LSP
snippet expression
```

## Parents

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

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