mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
vscode: migrate source_cnage.rs to rust-analyzer-api.rs
This commit is contained in:
parent
39efb301ff
commit
21ab133966
1 changed files with 2 additions and 7 deletions
|
@ -1,15 +1,10 @@
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as lc from 'vscode-languageclient';
|
import * as lc from 'vscode-languageclient';
|
||||||
|
import * as ra from './rust-analyzer-api';
|
||||||
|
|
||||||
import { Ctx } from './ctx';
|
import { Ctx } from './ctx';
|
||||||
|
|
||||||
export interface SourceChange {
|
export async function applySourceChange(ctx: Ctx, change: ra.SourceChange) {
|
||||||
label: string;
|
|
||||||
workspaceEdit: lc.WorkspaceEdit;
|
|
||||||
cursorPosition?: lc.TextDocumentPositionParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function applySourceChange(ctx: Ctx, change: SourceChange) {
|
|
||||||
const client = ctx.client;
|
const client = ctx.client;
|
||||||
if (!client) return;
|
if (!client) return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue