Skip to content

vscode.executeDocumentRenameProvider command gives error for virtual document #124591

@william-xiang

Description

@william-xiang

We are trying to support embedded SQL in the main language using request forwarding. For now we already did this for completion and hover, but have some trouble with rename. The problem is the snippet below always gives us this error:
Running the contributed command: 'vscode.executeDocumentRenameProvider' failed. It seems like the reason is that the document is not opened in the editor.

provideRenameEdits: async (document, position, newName, token, next) => {
    const vdocUri = this.getVirtualDocumentUri(document);
    return await commands.executeCommand<WorkspaceEdit>('vscode.executeDocumentRenameProvider', vdocUri, position, newName);
}

Is there any way to support rename for virtual document?


VS Code version: 1.56.2
vscode-languageclient: 7.0.0

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions