mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
Fix on enter
This commit is contained in:
parent
8475c962a0
commit
b98b1d0115
1 changed files with 2 additions and 2 deletions
|
@ -12,14 +12,14 @@ interface FileSystemEdit {
|
||||||
|
|
||||||
export interface SourceChange {
|
export interface SourceChange {
|
||||||
label: string;
|
label: string;
|
||||||
SourceFileNodeEdits: lc.TextDocumentEdit[];
|
sourceFileEdits: lc.TextDocumentEdit[];
|
||||||
fileSystemEdits: FileSystemEdit[];
|
fileSystemEdits: FileSystemEdit[];
|
||||||
cursorPosition?: lc.TextDocumentPositionParams;
|
cursorPosition?: lc.TextDocumentPositionParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function handle(change: SourceChange) {
|
export async function handle(change: SourceChange) {
|
||||||
const wsEdit = new vscode.WorkspaceEdit();
|
const wsEdit = new vscode.WorkspaceEdit();
|
||||||
for (const sourceEdit of change.SourceFileNodeEdits) {
|
for (const sourceEdit of change.sourceFileEdits) {
|
||||||
const uri = Server.client.protocol2CodeConverter.asUri(
|
const uri = Server.client.protocol2CodeConverter.asUri(
|
||||||
sourceEdit.textDocument.uri
|
sourceEdit.textDocument.uri
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue