Snippets selection should use key as label
Summary
Snippet selection currently uses the description value in the selection menu, which is typically longer than the key and may need to be truncated.
For example, with the snippet:
{
"Begin rescue ensure": {
"prefix": ["begin"],
"body": ["begin", " $0", "rescue $1", "ensure", "end", ""],
"description": "New Ruby begin block with rescue and ensure."
}
}
Zed will show:
Compare that to VS Code:
Zed Version and System Specs
Zed: v0.180.2 (Zed) OS: macOS 15.3.0 Memory: 16 GiB Architecture: aarch64
This makes sense. We should use the key in the completion menu and show the description in the aside menu for the snippet that is in the selected state.
I’d like to take on this issue and work on the fix. I will update the snippet rendering logic to display the snippet key as the primary label in the dropdown instead of the description. can u assign it to me?