deno
deno copied to clipboard
VSCode diagnostics for auto-detected JS do not disappear when explicitly correcting the language mode to "JSON"
Version: Deno 2.0.0
In VSCode, I hit Ctrl+N to open a new unsaved buffer, then paste some JSON. VSCode autodetects the language as Javascript, so Deno generates diagnostics about missing semicolons, etc. Then I manually set language mode to JSON to fix syntax highlighting, yet the Deno diagnostics do not disappear.
Not sure if this is a VSCode bug for still asking Deno for diagnostics when it shouldn't. Or if it's a Deno bug where it does not remove the old diagnostics once VSCode changes the language mode.
The images below show my editor buffer, my problems pane, and the language mode, plus you can see the tooltip showing that VSCode auto-detected the language as Javascript.
Language server init w/version #
Starting Deno language server...
version: 2.0.0 (release, x86_64-pc-windows-msvc)
executable: C:\Users\abradley\AppData\Local\Microsoft\WinGet\Links\deno.EXE
Connected to "Visual Studio Code" 1.94.2