Writes random jumble on save when an error exists
See original GitHub issueDescribe the bug Sometimes, when saving, the lsp writes seemingly random stuff where there is an error, The text is written before the lsp recognises that the error is fixed, so it creates and error and writes again.
To Reproduce Steps to reproduce the behavior: Have an error, spam save, (works on my end)
<button class="btn-icon delete">
<Icon data="{icons.trash}" />
</button>
turns into
<button class="btn-icon delete">
<Icon data="{icons.rashtrrrrrr}" />
</button>
Expected behavior Not writing anything and/or waiting to complete analysis before doing so
Screenshots
After a few saves, the example 2 turns into
before saving after saving
System (please complete the following information):
- OS: Linux (5.11.16-arch1-1)
- IDE: VSCode
- Plugin/Package: “Svelte for VSCode” - v104.10.2
Additional context The only way to work around this issue is to kill the lsp, write and save before it completly starts, and then it works fine until the bugs appears again.
I don’t really understand how this works. With logging to verbose, the extension logs
[Trace - 10:12:53] Sending request 'textDocument/codeAction - (959)'.
Params: {
"textDocument": {
"uri": "file:///home/karitham/Projects/STM/Front/src/components/Table/Table.svelte"
},
"range": {
"start": {
"line": 79,
"character": 44
},
"end": {
"line": 79,
"character": 44
}
},
"context": {
"diagnostics": []
}
}
for the example 1 (the first picture)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top GitHub Comments
I can reproduce this now given your complete file, thanks. I’ll investigate.
Yep, haven’t had any issue since installing the new version, thanks a lot for the cybernetically enhanced reactivity