diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/commands/matching_brace.ts | 4 | ||||
-rw-r--r-- | editors/code/src/rust-analyzer-api.ts | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts index a60776e2d..9c418b887 100644 --- a/editors/code/src/commands/matching_brace.ts +++ b/editors/code/src/commands/matching_brace.ts | |||
@@ -9,9 +9,9 @@ export function matchingBrace(ctx: Ctx): Cmd { | |||
9 | const client = ctx.client; | 9 | const client = ctx.client; |
10 | if (!editor || !client) return; | 10 | if (!editor || !client) return; |
11 | 11 | ||
12 | const response = await client.sendRequest(ra.findMatchingBrace, { | 12 | const response = await client.sendRequest(ra.matchingBrace, { |
13 | textDocument: { uri: editor.document.uri.toString() }, | 13 | textDocument: { uri: editor.document.uri.toString() }, |
14 | offsets: editor.selections.map(s => | 14 | positions: editor.selections.map(s => |
15 | client.code2ProtocolConverter.asPosition(s.active), | 15 | client.code2ProtocolConverter.asPosition(s.active), |
16 | ), | 16 | ), |
17 | }); | 17 | }); |
diff --git a/editors/code/src/rust-analyzer-api.ts b/editors/code/src/rust-analyzer-api.ts index 73f36432f..900c5cd5b 100644 --- a/editors/code/src/rust-analyzer-api.ts +++ b/editors/code/src/rust-analyzer-api.ts | |||
@@ -40,12 +40,11 @@ export interface ExpandedMacro { | |||
40 | export const expandMacro = request<ExpandMacroParams, Option<ExpandedMacro>>("expandMacro"); | 40 | export const expandMacro = request<ExpandMacroParams, Option<ExpandedMacro>>("expandMacro"); |
41 | 41 | ||
42 | 42 | ||
43 | export interface FindMatchingBraceParams { | 43 | export interface MatchingBraceParams { |
44 | textDocument: lc.TextDocumentIdentifier; | 44 | textDocument: lc.TextDocumentIdentifier; |
45 | offsets: Vec<lc.Position>; | 45 | positions: lc.Position[]; |
46 | } | 46 | } |
47 | export const findMatchingBrace = request<FindMatchingBraceParams, Vec<lc.Position>>("findMatchingBrace"); | 47 | export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], unknown>('experimental/matchingBrace'); |
48 | |||
49 | 48 | ||
50 | export interface PublishDecorationsParams { | 49 | export interface PublishDecorationsParams { |
51 | uri: string; | 50 | uri: string; |