Johannes Rieken
2021-09-23 16:25:21 +02:00
parent a15378a9db
commit 94ffa6fc39
3 changed files with 52 additions and 0 deletions

View File

@@ -156,6 +156,19 @@ const newCommands: ApiCommand[] = [
new ApiCommandResult<IOutgoingCallDto[], types.CallHierarchyOutgoingCall[]>('A CallHierarchyItem or undefined', v => v.map(typeConverters.CallHierarchyOutgoingCall.to))
),
// --- rename
new ApiCommand(
'vscode.prepareRename', '_executePrepareRename', 'Execute the prepareRename of rename provider.',
[ApiCommandArgument.Uri, ApiCommandArgument.Position],
new ApiCommandResult<modes.RenameLocation, { range: types.Range, placeholder: string } | undefined>('A promise that resolves to a range and placeholder text.', value => {
if (!value) {
return undefined;
}
return {
range: typeConverters.Range.to(value.range),
placeholder: value.text
};
})
),
new ApiCommand(
'vscode.executeDocumentRenameProvider', '_executeDocumentRenameProvider', 'Execute rename provider.',
[ApiCommandArgument.Uri, ApiCommandArgument.Position, ApiCommandArgument.String.with('newName', 'The new symbol name')],