diff --git a/extensions/html-language-features/client/src/htmlMain.ts b/extensions/html-language-features/client/src/htmlMain.ts index 567e073f838..ad1aa45f310 100644 --- a/extensions/html-language-features/client/src/htmlMain.ts +++ b/extensions/html-language-features/client/src/htmlMain.ts @@ -167,6 +167,16 @@ export function activate(context: ExtensionContext) { } }); + disposable = languages.registerOnTypeRenameProvider(documentSelector, { + async provideOnTypeRenameRanges(document, position) { + const param = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position); + const response = await client.sendRequest(OnTypeRenameRequest.type, param); + + return response || []; + } + }); + toDispose.push(disposable); + }); function updateFormatterRegistration() { @@ -280,15 +290,6 @@ export function activate(context: ExtensionContext) { return results; } }); - - languages.registerOnTypeRenameProvider(documentSelector, { - async provideOnTypeRenameRanges(document, position) { - const param = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position); - const response = await client.sendRequest(OnTypeRenameRequest.type, param); - - return response || []; - } - }); } function getPackageInfo(context: ExtensionContext): IPackageInfo | null {