ast-grep / ast-grep-vscode

ast-grep VSCode is a structural search and replace extension for many languages.
https://marketplace.visualstudio.com/items?itemName=ast-grep.ast-grep-vscode
MIT License
158 stars 12 forks source link

Extension causing hang on save with "Getting code actions from 'ast-grep VSCode:....." #308

Closed evelant closed 3 months ago

evelant commented 5 months ago

Per the title, after installing the extension and setting up a config for my project saving files hangs on code actions. sg-grep works fine on the command line and the linting works fine in the editor. Only saving is the problem. There is no useful output in the output panel, only

[Info  - 1:33:30 PM] file opened!
Parsing doc.
Publishing init diagnostics.
HerringtonDarkholme commented 5 months ago

Would you mind having a reproduction repo so I can have a look? thanks!

evelant commented 5 months ago

I set "source.fixAll": "never in edit.codeActionsOnSave in settings and that seems to have fixed it. I don't have a minimal reproduction at the moment.

evelant commented 5 months ago

Oops I guess I spoke too soon. That appeared to fix it but did not. It's still happening. I'll see if I can figure out a minimal reproduction.

evelant commented 5 months ago

🤦 and I had forgotten that I had a different setting for that in workspace config. With "source.fixAll": "never" the problem does not occur. It was happening with "source.fixAll.eslint": "explicit", so that's a clue.