-
-
Notifications
You must be signed in to change notification settings - Fork 219
Description
Describe 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
After a few saves, the example 2 turns into
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)