-
Notifications
You must be signed in to change notification settings - Fork 286
Auto-formatting is deleting all text #443
Comments
You are going to have to provide more information |
Same here.
What other information do you need?
|
Well just to start: what formatter? What's your configuration? What's the console output? Do you see a Basically the part in the issue template that wasn't filled out: This and the next section should include screenshots, code samples, console output, etc. The more information we have to reproduce the better! |
Oh, you are right. I posted Lint output, welp. I'm using rubocop. I noticed that when I launch/reload vscode it throws error
configuratioon:
|
Do you have a lot of lint errors in that file? I wonder if it's related to another issue where the RuboCop output is really long |
It happens even to a file with only 1 lint error. |
Ok. It is this specific line + this ternary that's doing that. I'll have to take another pass as I introduced those to fix other bugs with selection formatting. |
:) Glad you found the cause. Do you need any help with that? |
No, I think I'm going to have to combine the fix with #435. I need to introduce a buffer on all |
Seems like a good solution 👍 Good luck then. Feel free to ping me to test the fix. |
v0.22.3 has the bugfix for this |
Almost...
Or is it correct behaviour? |
Well, replacing the file contents is probably not correct. The problem I'm trying to work around is that bundler doesn't distinguish between I'll add a test case for it. This is actually a different issue than originally though so I'll probably open a new one and link them. |
I see, thanks for the information and the fix 👍 |
Can you post the full Output you are seeing? Having trouble reproducing |
Which Output exactly? |
The |
|
Interesting. When I try and reproduce this setup:
I get a correctly handled language server error. Are you using a binstub? |
AFAIK, no, I don't. |
ok but you have rubocop installed globally? |
Yes, I do.
|
Reproduced it. Thanks |
Was this solved? I'm having the same issue. |
So this is funny, I just hit this issue. And I switched to .asdf yesterday... |
Your environment
vscode-ruby
version:Expected behavior
autoformat on save
Actual behavior
deletes the contents of the entire file
This and the next section should include screenshots, code samples, console output, etc. The more information we have to reproduce the better!
The text was updated successfully, but these errors were encountered: