Description
Typing Liquid delimiters does not auto-close them properly. Currently, typing {{ produces {{} with the cursor between the second { and the }, which is incorrect. The extension should auto-close all Liquid delimiters with their proper closing counterparts and position the cursor conveniently.
Expected behavior
| Typed |
Result |
Cursor position (shown as ▌) |
{{ |
{{ ▌ }} |
Centered with spaces |
{{- |
{{- ▌ -}} |
Centered with spaces |
{% |
{% ▌ %} |
Centered with spaces |
{%- |
{%- ▌ -%} |
Centered with spaces |
The cursor should be placed in the middle with a space on each side, ready for the user to type the expression or tag name.
Actual behavior
Typing {{ produces {{} — it appears the editor treats { as a bracket that should be auto-closed with }, but it doesn't recognize {{ as a Liquid delimiter pair. The result is a malformed output with the cursor in the wrong position.
Steps to reproduce
- Open any
.liquid file in Zed
- Type
{{
- Observe the result is
{{} instead of {{ ▌ }}
- Same issue occurs with
{%
Additional context
This is a very common quality-of-life feature in other editors with Liquid support (e.g., VS Code with the Shopify Liquid extension). Proper auto-closing of Liquid delimiters significantly improves the development experience, as these are typed hundreds of times per day during theme development.
Suggested implementation
Zed supports bracket pair configuration in language extensions. The following pairs should be configured:
{{ / }}
{% / %}
{{- / -}}
{%- / -%}
With auto-inserted spaces around the cursor position for each pair.
Description
Typing Liquid delimiters does not auto-close them properly. Currently, typing
{{produces{{}with the cursor between the second{and the}, which is incorrect. The extension should auto-close all Liquid delimiters with their proper closing counterparts and position the cursor conveniently.Expected behavior
▌){{{{ ▌ }}{{-{{- ▌ -}}{%{% ▌ %}{%-{%- ▌ -%}The cursor should be placed in the middle with a space on each side, ready for the user to type the expression or tag name.
Actual behavior
Typing
{{produces{{}— it appears the editor treats{as a bracket that should be auto-closed with}, but it doesn't recognize{{as a Liquid delimiter pair. The result is a malformed output with the cursor in the wrong position.Steps to reproduce
.liquidfile in Zed{{{{}instead of{{ ▌ }}{%Additional context
This is a very common quality-of-life feature in other editors with Liquid support (e.g., VS Code with the Shopify Liquid extension). Proper auto-closing of Liquid delimiters significantly improves the development experience, as these are typed hundreds of times per day during theme development.
Suggested implementation
Zed supports bracket pair configuration in language extensions. The following pairs should be configured:
{{/}}{%/%}{{-/-}}{%-/-%}With auto-inserted spaces around the cursor position for each pair.