From 9ea63d5a86b8217c25f0db49a535105b345ceae1 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Tue, 25 Feb 2020 00:56:57 +0200 Subject: vscode: migrate ssr to rust-analyzer-api.ts --- editors/code/src/commands/ssr.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'editors') diff --git a/editors/code/src/commands/ssr.ts b/editors/code/src/commands/ssr.ts index 9b814612a..63c36ce80 100644 --- a/editors/code/src/commands/ssr.ts +++ b/editors/code/src/commands/ssr.ts @@ -1,6 +1,8 @@ -import { Ctx, Cmd } from '../ctx'; -import { applySourceChange, SourceChange } from '../source_change'; import * as vscode from 'vscode'; +import * as ra from "../rust-analyzer-api"; + +import { Ctx, Cmd } from '../ctx'; +import { applySourceChange } from '../source_change'; export function ssr(ctx: Ctx): Cmd { return async () => { @@ -21,16 +23,8 @@ export function ssr(ctx: Ctx): Cmd { if (!request) return; - const ssrRequest: SsrRequest = { arg: request }; - const change = await client.sendRequest( - 'rust-analyzer/ssr', - ssrRequest, - ); + const change = await client.sendRequest(ra.ssr, { arg: request },); await applySourceChange(ctx, change); }; } - -interface SsrRequest { - arg: string; -} -- cgit v1.2.3