extensions/markdown-language-features/server/src/workspace.ts/VsCodeClientWorkspace/openMarkdownDocumentFromFs
class VsCodeClientWorkspace:	private async openMarkdownDocumentFromFs(resource: URI): Promise<md.ITextDocument | undefined> {
		if (!looksLikeMarkdownPath(this.config, resource)) {
			return undefined;
		}

		try {
			const response = await this.connection.sendRequest(protocol.fs_readFile, { uri: resource.toString() });
			// TODO: LSP doesn't seem to handle Array buffers well
			const bytes = new Uint8Array(response);

			// We assume that markdown is in UTF-8
			const text = this._utf8Decoder.decode(bytes);
			const doc = new VsCodeDocument(resource.toString(), {
				onDiskDoc: TextDocument.create(resource.toString(), 'markdown', 0, text)
			});
			this._documentCache.set(resource, doc);
			return doc;
		} catch (e) {
			return undefined;
		}
	}