Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gushogg-blake opened this issue Oct 27, 2021 · 1 comment

Comments

@gushogg-blake
Copy link

gushogg-blake commented Oct 27, 2021

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).

@rcjsuen
Copy link
Contributor

rcjsuen commented Oct 27, 2021

Also see #336 and #814.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants