diff options
author | Aleksey Kladov <[email protected]> | 2020-05-24 15:18:46 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-24 15:53:18 +0100 |
commit | 934227361623b258d833be20e464e1509cb432ad (patch) | |
tree | cfb43f218d80f8e29045cf75e6e31ccfd6ca3782 /editors | |
parent | 7e862626cc892662c3c95ba393483ac89c07e31a (diff) |
Document matchingBrace LSP request
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; |