Closed adamsoutar closed 1 month ago
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
Really appreciate the improvement!
Just to add to this, there are still some decently common circumstances that cause Zed to do the wrong thing. For example,
Commenting any individual prop of a JSX element isn't correct.
and the same issue happens when commenting inside objects passed as JSX props.
I wonder what's the status of this, still facing this issue on both .tsx
& .jsx
files
I wonder what's the status of this, still facing this issue on both
.tsx
&.jsx
files
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.
I wonder what's the status of this, still facing this issue on both
.tsx
&.jsx
filesThis 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. On the other hand, I have the same problem with comments on StyledComponents. It always comments the code like this
// Some code
And it should be like this
/* Some code */
Plus one, this must have broken with a new release. I'm on 0.149.5 5321b10aa41e2ac0603c7a6fc99ba1ae9421b460 and it's just doing //
in tsx.
Looks like it broke because of external dependency upgrade. See https://github.com/zed-industries/zed/issues/16337#issuecomment-2293231241
/cc @SomeoneToIgnore
Seems like the two issues can be treated as duplicates. Oof, this is a really painful regression 😣
Experiencing the same thing here on the Linux version.
Line 73's comment toggling should have been
{/* {originalWord} */}
Zed 0.149.6 on Arch Linux
confirmed today 😞 System Version: macOS 14.6.1 (23G93) Kernel Version: Darwin 23.6.0 Zed: Zed 0.150.4
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 block_comment
looks right. I'm not sure why it's not actually getting triggered as a line_comment instead?
Another stable release about a day ago, nothing to address this issue... How is this still not fixed.
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?
I know as much as you do 🤷
Actually, it seems to be in the preview release 0.154.0 (09/19/2024): https://zed.dev/releases/preview It does seem to work 👌
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: