In VSCode, when opening a new file via ctrl+n
, vscode-haskell spawns a new HLS instance for the file that hasn't been persisted to the file system yet and is only available in the VFS.
The only way to fix that is to save the file to disk and then restart the extension.