Support non-alphanumeric characters in snippet prefixes #16740
Labels
enhancement
[core label]
popovers
Feedback for tooltips, syntax hints, info popups, toasts, etc
snippets
Check for existing issues
Describe the feature
I'd like to be able to define snippets whose prefixes include non-alphanumeric characters. This is supported by VS Code, and I use it to define a "smart quotes" snippet, for example:
Thus, typing two
"
characters in the buffer inserts a pair of matched curly quotes, and leaves the cursor inside them to enter some quoted text.A little experimentation with Zed suggests that, while prefixes can contain non-alphanumeric characters, as soon as you type that character in the editor, the suggested completion disappears. For example, if you define this snippet:
and you type
a
in the editor, the suggesteda@
completion is displayed, and you can complete it with Tab/Enter, but if you instead type@
, the completion disappears and is no longer available. That means you can't complete a snippet whose prefix begins with a non-alphanumeric character, for example.If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: