[rename on type] Language client is not ready yet. FIxes #97062
parent
ff39ebfaaf
commit
3887bc8aca
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue