Skip to content

Add trailing space to line comment prefixes - #10

Merged
h2000 merged 1 commit into
h2000:mainfrom
JosephTLyons:line-comment-trailing-space
Aug 21, 2026
Merged

Add trailing space to line comment prefixes#10
h2000 merged 1 commit into
h2000:mainfrom
JosephTLyons:line-comment-trailing-space

Conversation

@JosephTLyons

@JosephTLyons JosephTLyons commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR adds a trailing space to the line comment prefixes, so that toggling comments in Zed inserts # instead of #.

The Roc formatter enforces a space after #, adding it after commenting and stripping the leftover one after uncommenting, so saving after toggling a comment shifts the text either way. With the space included, Zed matches the formatted output and removes exactly the right text.

This also matches how most languages in Zed define their comment prefixes, e.g. Python.

@h2000
h2000 merged commit 67cde61 into h2000:main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants