Skip to content

Conversation

claytonrcarter
Copy link
Contributor

Support for extending doc comments on newline has changed since we merged #27, and Zed now requires that languages have a @comment.inclusive override for that feature to work. This change adds such an override for PHP comments, and also for (string) as well, because that seems to be a common override in other lang extensions.

Caveat: I don't understand the relevance of these overrides, and this is very much a "me copy code here. make problem fix gud" sort of fix. 😄 I have read the relevant docs at https://zed.dev/docs/extensions/languages#syntax-overrides but still don't quite see the relevance in this context. But it works. Please correct me if I'm wrong! 😄

Repro: With latest version installed, opening this snippet w/ cursor at ^ and pressing enter will insert a new, blank line, but with this PR, it will insert a line starting with * as expected.

<?php
/**
 * ^
 */

cc @smitbarmase for input/comment on if this config is incorrect

Not sure why these are needed, but many other languages have them, and
extending doc/block comments on newline doesn't work without them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants