biomejs / biome-zed

Biome extension for Zed
https://biomejs.dev
MIT License
168 stars 6 forks source link

Biome making code actions freeze #14

Closed christian-gama closed 4 months ago

christian-gama commented 6 months ago

I did not figure it out what is triggering this bug, but the code actions is simply not showing up after a random period of time after the IDE is open. Most of the times this bug happens within a minute or two after the IDE is open. The only way to make code actions work again is by restarting the IDE or disabling the Biome extension.

By freezing I mean that when I press cmd + . to trigger the code actions menu, nothing happens.

chungweileong94 commented 6 months ago

I’m not sure if this is Zed or Biome binary issue, but I managed to consistently reproduce the problem.

Basically I just perform “Go to Definition”, which will bring me to the node_modules source, if I continue to browse some files in there, and go back to my code again, all biome stuff stop working, linking, code action, formatted, etc.

I am thinking if this is because Zed/biome is having hard time to process too many files at a time.

https://github.com/biomejs/biome-zed/assets/15154097/25b54365-33f5-440c-97ea-cb2af31ada58

chungweileong94 commented 6 months ago

One thing to note is that if you are using Biome 1.7.2, and perform the steps that I mentioned above, you will get this issue https://github.com/biomejs/biome/issues/2683, downgrade the version will get rid of the error, but the biome issue on Zed will remain. Which there might be a possibility where the 1.7.2 surface the issue.

chungweileong94 commented 6 months ago

After checking the LSP RPC logs, it seems like it's caused by Biome LSP, for some reason, Biome LSP stopped working properly after I started opening some files from node_modules.

Setting the vsc option does help reduce this a lot, but the problem will happen again randomly.

"vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
}

https://github.com/biomejs/biome-zed/assets/15154097/7c224c58-0b36-4c53-a0a6-6a2ae61d76f5

ematipico commented 6 months ago

Can you update to biome v1.7.3? We have an issue that was causing some panics

chungweileong94 commented 6 months ago

Can you update to biome v1.7.3? We have an issue that was causing some panics

Yeah, just upgraded to 1.7.3, and the panics are no longer happening. Will have to give it a day or two to see if the LSP freeze issue still happening, but so far it looks pretty solid.

thm76 commented 6 months ago

I've got something similar, and it's still happening with 1.7.3 After a little while the biome extension seems to stop working - no formatting, no code actions, nothing. Restarting zed fixes it for a while.

I did notice this in the log just now: 2024-05-07T14:38:43+10:00 [ERROR] crates/lsp/src/lsp.rs:352: cannot read LSP message headers 2024-05-07T14:38:43+10:00 [WARN] Generic lsp request to biome_lsp failed: server shut down

Is there somewhere I can see more detailed logs?

ematipico commented 6 months ago

I think this is a zed issue. You can find more logs here: https://biomejs.dev/guides/integrate-in-editor/#daemon-logs

luckydye commented 5 months ago

I have not seen this in a while btw. (Im on Zed 0.139 and biome 1.8.0)

luckydye commented 4 months ago

I'll close this issue as it appears to be fixed.

https://github.com/zed-industries/zed/issues/10786