Skip to content

Diagnostics in untitled files in Visual Studio Code aren't being targeted to the untitled file #1924

@ShamblesSM

Description

@ShamblesSM

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

Untitled files should be given diagnostics just like saved files.

Actual Behaviour

Untitled files aren't getting the diagnostics. While the diagnostics themselves work, the "file" that the diagnostics are reporting point to a non-existent file.

Reproduction steps

  1. Create a new file.
  2. Type anything that would cause diagnostics to kick in (such as a syntax error).
  3. Notice the lack of squiggly lines.

Additional Notes

image

Log File

service.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions