mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
[rename on type] Language client is not ready yet. FIxes #97062
This commit is contained in:
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 a new issue