Creates a new document at the given document URI, with the given version and language and creates a copy of the text to use.
// e.g. received from LSP client TextDocumentItem item = { uri: "file:///home/projects/app.c", languageId: "cpp", version_: 0, text: "#include <stdio>", }; auto doc = Document(item); assert(doc.length == "#include <stdio>".length);
See Implementation
Creates a new document at the given document URI, with the given version and language and creates a copy of the text to use.