adopt web extensions to webpack 5

This commit is contained in:
Martin Aeschlimann
2021-07-08 21:41:03 +02:00
parent a3e07245ee
commit 7ebe6a6054
51 changed files with 552 additions and 277 deletions

View File

@@ -58,6 +58,9 @@ export interface Runtime {
TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string; } };
fs?: RequestService;
telemetry?: TelemetryReporter;
readonly timer: {
setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): Disposable;
}
}
export function startClient(context: ExtensionContext, newLanguageClient: LanguageClientConstructor, runtime: Runtime) {
@@ -126,7 +129,7 @@ export function startClient(context: ExtensionContext, newLanguageClient: Langua
let param = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position);
return client.sendRequest(TagCloseRequest.type, param);
};
disposable = activateTagClosing(tagRequestor, { html: true, handlebars: true }, 'html.autoClosingTags');
disposable = activateTagClosing(tagRequestor, { html: true, handlebars: true }, 'html.autoClosingTags', runtime);
toDispose.push(disposable);
disposable = client.onTelemetry(e => {