sketch for virtual document support for

This commit is contained in:
Jan Kretschmer
2021-11-01 14:50:32 +01:00
parent c2f44d476b
commit b074018c3e
3 changed files with 40 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ import {
DocumentRangeFormattingRequest, ProvideCompletionItemsSignature, TextDocumentIdentifier, RequestType0, Range as LspRange, NotificationType, CommonLanguageClient
} from 'vscode-languageclient';
import { activateTagClosing } from './tagClosing';
import { RequestService } from './requests';
import { RequestService, serveFileSystemRequests } from './requests';
import { getCustomDataSource } from './customData';
namespace CustomDataChangedNotification {
@@ -120,6 +120,8 @@ export function startClient(context: ExtensionContext, newLanguageClient: Langua
toDispose.push(disposable);
client.onReady().then(() => {
serveFileSystemRequests(client, runtime, context.subscriptions);
client.sendNotification(CustomDataChangedNotification.type, customDataSource.uris);
customDataSource.onDidChange(() => {
client.sendNotification(CustomDataChangedNotification.type, customDataSource.uris);