Skip to content

biome incorrectly collapses whitespace on closing paren #79

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

Open
maxpetretta opened this issue Mar 25, 2025 · 10 comments
Open

biome incorrectly collapses whitespace on closing paren #79

maxpetretta opened this issue Mar 25, 2025 · 10 comments
Labels
needs triage Issue needs to be triaged

Comments

@maxpetretta
Copy link

for the last week or so, the biome extension in zed has been incorrectly collapsing whitespace, specifically when typing a closing paren. the issue seems to only happen when there is an existing return statement within the function (see video). removing the extension from zed fixes the issue.

note: i am not saving in the video after typing the closing paren, so formatting should not be taking place

versions:

zed v0.178.5
biome extension v0.1.4

to reproduce:

bun init biome-zed-test
cd ./biome-zed-test
bunx biome init # default config used
zed . # try writing a function
CleanShot.2025-03-24.at.21.32.00.mp4
@ematipico ematipico added the needs reproduction Requires a reproduction label Mar 25, 2025
@ematipico
Copy link
Member

ematipico commented Mar 25, 2025

note: i am not saving in the video after typing the closing paren, so formatting should not be taking place

If it worked before, then I'm not sure it's a Biome bug. Did you update something related to biome?

note: i am not saving in the video after typing the closing paren, so formatting should not be taking place

Maybe you have some settings that allow that? Or some other extension is getting in the way?

@ematipico ematipico added needs triage Issue needs to be triaged needs reproduction Requires a reproduction and removed needs reproduction Requires a reproduction labels Mar 25, 2025
Copy link

Hello @maxpetretta, please provide a minimal reproduction. You can use one of the following options:

  • Provide a link to our playground, if it's applicable.
  • Provide a link to GitHub repository. To easily create a reproduction, you can use our interactive CLI via npm create @biomejs/biome-reproduction

Issues marked with S-Needs repro will be closed if they have no activity within 3 days.

@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Mar 25, 2025
@maxpetretta
Copy link
Author

@ematipico i haven't updated biome to my knowledge, v1.9.4. i have zed's autosave setting set to "off" for the demo.

i've also tried the extension's new update released this morning, same behavior.

i only have theme/language extensions installed (besides biome). i'll see if i can try a clean zed install tonight

@wcastand
Copy link

i get it too, happens on ) or ] i'm on preview of zed

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2025
@tom-james-watson
Copy link

tom-james-watson commented Apr 4, 2025

I've also been getting this for the past couple of weeks and I can fix it by uninstalling this extension, though obviously that's not really an option if our codebase uses biome formatting.

I don't think this should have been closed.

@tom-james-watson
Copy link

I see this with versions 0.1.5, 0.1.4, and 0.1.3. I didn't test any earlier. I think mostly likely there has been some change in Zed which has broken this extension.

@ematipico
Copy link
Member

No one has provided a reproduction. I'd be happy to open it if a reproduction is provided

@maxpetretta
Copy link
Author

My apologies, that was on me.

@ematipico here is a reproduction: https://github.com/maxpetretta/biome-zed-whitespace-closing-paren

@ematipico
Copy link
Member

ematipico commented Apr 5, 2025

@maxpetretta can you also please add the zed settings? Usually they are inside .zed/settings.json

@ematipico ematipico reopened this Apr 5, 2025
@maxpetretta
Copy link
Author

i have added my personal zed settings to the repo

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2025
@ematipico ematipico added needs triage Issue needs to be triaged and removed needs reproduction Requires a reproduction labels Apr 9, 2025
@ematipico ematipico reopened this Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants