aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-24 15:18:46 +0100
committerAleksey Kladov <[email protected]>2020-05-24 15:53:18 +0100
commit934227361623b258d833be20e464e1509cb432ad (patch)
treecfb43f218d80f8e29045cf75e6e31ccfd6ca3782 /editors
parent7e862626cc892662c3c95ba393483ac89c07e31a (diff)
Document matchingBrace LSP request
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/commands/matching_brace.ts4
-rw-r--r--editors/code/src/rust-analyzer-api.ts7
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 {
40export const expandMacro = request<ExpandMacroParams, Option<ExpandedMacro>>("expandMacro"); 40export const expandMacro = request<ExpandMacroParams, Option<ExpandedMacro>>("expandMacro");
41 41
42 42
43export interface FindMatchingBraceParams { 43export interface MatchingBraceParams {
44 textDocument: lc.TextDocumentIdentifier; 44 textDocument: lc.TextDocumentIdentifier;
45 offsets: Vec<lc.Position>; 45 positions: lc.Position[];
46} 46}
47export const findMatchingBrace = request<FindMatchingBraceParams, Vec<lc.Position>>("findMatchingBrace"); 47export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], unknown>('experimental/matchingBrace');
48
49 48
50export interface PublishDecorationsParams { 49export interface PublishDecorationsParams {
51 uri: string; 50 uri: string;