Skip to content

Clarify server's behaviour around virtual (not stored on disk) documents #1369

Open
@gushogg-blake

Description

@gushogg-blake

The documentation of the textDocument/didOpen notification doesn't explicitly state that the document can be virtual, or whether the contents passed with the text field have to match the contents on-disk if not virtual.

It also doesn't make any assertions about whether or when the notification will be processed, or what the server will do with virtual documents (does the server have to treat them the same as on-disk documents for the purposes of completion requests, for example?)

Edit I suppose it makes sense for server implementors to make sure they process didOpen notifications before subsequent requests, so they should be processed in time as long as they're received in order. I'm still having issues with completion requests coming back empty with URIs like virtual:///path/to/file.js-123 though (where file:///path/to/file.js is an actual file on disk, and the same completion request sequence works fine if that's given as the URI).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions