-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comment shortcut is not correct in JSX #5291
Comments
This should be improved in our next major release! There is still some work to be done as not all edge cases with invalid syntax are handled correctly but it should behave as expected the majority of the time |
I wonder what's the status of this, still facing this issue on both |
This was working fine before one of the recent updates which broke it, im not sure which version of the update broke it, but its not working as intended now. |
Yes, it was working on Zed 0.146.5. I just downgraded and verified that it works on that version. |
I'll have to downgrade as well then. |
Hmm, Ig I'll wait for it to fix and use vscode meanwhile. This is the only thing stopping me from using zed on react codebase. |
Waiting for this fix. |
For me, a downgrade is not an option. As ShaikRehan123 says, I'll also use Vscode while this is fixed.
And it should be like this
|
Plus one, this must have broken with a new release. I'm on 0.149.5 5321b10 and it's just doing |
Looks like it broke because of external dependency upgrade. See #16337 (comment) /cc @SomeoneToIgnore |
Seems like the two issues can be treated as duplicates. Oof, this is a really painful regression 😣 |
confirmed today 😞 |
Any update on this problem?, it's very frustrating that I can't use it just because of this. |
I saw a new stable release today, and it's disappointing to see that this issue still hasn't been resolved. |
Looks here: https://github.com/zed-industries/zed/blob/main/crates/languages/src/tsx/config.toml#L23 The |
This comment has been minimized.
This comment has been minimized.
Fixes #5291 Release Notes: - Fixed a bug where the 'toggle comments' command didn't use the right comment syntax in JSX and TSX elements. --------- Co-authored-by: Conrad <[email protected]> Co-authored-by: Conrad Irwin <[email protected]> Co-authored-by: Kirill Bulatov <[email protected]>
I was trying version 0.152.4 and the problem persists, I know this is already closed, I would like to ask if there is any special configuration, or if this fix goes into a new version? |
@gabwill10 the fix wasn't released yet |
when will this fix be released @charlesszilagyi? |
Actually, it seems to be in the preview release 0.154.0 (09/19/2024): https://zed.dev/releases/preview |
Fixes zed-industries#5291 Release Notes: - Fixed a bug where the 'toggle comments' command didn't use the right comment syntax in JSX and TSX elements. --------- Co-authored-by: Conrad <[email protected]> Co-authored-by: Conrad Irwin <[email protected]> Co-authored-by: Kirill Bulatov <[email protected]>
Describe the bug
When pressing the 'comment selected lines' shortcut (
Cmd+/
) in JSX, Zed inserts the wrong kind of comment.To reproduce
Select some JSX tags, press
Cmd+/
(default keymap)Expected behavior
Zed should comment tags like so:
But instead, it does:
This is not a valid way to comment JSX syntax.
Screenshots
As you can see, VS Code inserts the right type of comment when JSX is selected:
Environment:
The text was updated successfully, but these errors were encountered: