Skip to content

Commit 9ea63d5

Browse files
author
Veetaha
committed
vscode: migrate ssr to rust-analyzer-api.ts
1 parent 8a8a4d0 commit 9ea63d5

File tree

1 file changed

+5
-11
lines changed
  • editors/code/src/commands

1 file changed

+5
-11
lines changed

editors/code/src/commands/ssr.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { Ctx, Cmd } from '../ctx';
2-
import { applySourceChange, SourceChange } from '../source_change';
31
import * as vscode from 'vscode';
2+
import * as ra from "../rust-analyzer-api";
3+
4+
import { Ctx, Cmd } from '../ctx';
5+
import { applySourceChange } from '../source_change';
46

57
export function ssr(ctx: Ctx): Cmd {
68
return async () => {
@@ -21,16 +23,8 @@ export function ssr(ctx: Ctx): Cmd {
2123

2224
if (!request) return;
2325

24-
const ssrRequest: SsrRequest = { arg: request };
25-
const change = await client.sendRequest<SourceChange>(
26-
'rust-analyzer/ssr',
27-
ssrRequest,
28-
);
26+
const change = await client.sendRequest(ra.ssr, { arg: request },);
2927

3028
await applySourceChange(ctx, change);
3129
};
3230
}
33-
34-
interface SsrRequest {
35-
arg: string;
36-
}

0 commit comments

Comments
 (0)