sveltejs / language-tools

The Svelte Language Server, and official extensions which use it
MIT License
1.23k stars 197 forks source link

Code linting not updating realtime (Svelte for VS Code) #1329

Closed ShapeMess closed 1 year ago

ShapeMess commented 2 years ago

Describe the bug Svelte for VS Code extension v105.9.0 seems to have introduced a bug with JS/TS scripts which results in linting completely breaking. Errors and warnings are not being updated realtime nor on file save. After a few code changes hover tooltips are showing content for different lines in the document. Snippets and completion are not working properly and are suggesting content for source code that was originally loaded in specific line in the file. Reloading the editor helps only until the code is edited, after which another reload is requred.

To Reproduce

  1. Install version v105.9.0 of the extension.
  2. Edit the source code, introduce some errors and check tooltips.

Expected behavior

Screenshots Window object reference right after a reload: screen1 After changing the window reference to an invalid piece of code, there are no errors, warnings and hints still suggest this is a window object. screen2 After a reload: screen3 Errors/warning basically sit in place(?) Which looks like linting is done only on initial load and then stops. screen4

System:

Additional context Linting is only being done once per file and then requires an editor reload - This would suggest why errors "stay in place" after editing the source code.