aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/analyzer_status.ts9
-rw-r--r--editors/code/src/commands/extend_selection.ts2
-rw-r--r--editors/code/src/commands/join_lines.ts2
-rw-r--r--editors/code/src/commands/matching_brace.ts2
-rw-r--r--editors/code/src/commands/on_enter.ts2
-rw-r--r--editors/code/src/commands/parent_module.ts2
-rw-r--r--editors/code/src/commands/runnables.ts2
-rw-r--r--editors/code/src/commands/syntaxTree.ts4
8 files changed, 14 insertions, 11 deletions
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts
index bb46a1990..63f82c92d 100644
--- a/editors/code/src/commands/analyzer_status.ts
+++ b/editors/code/src/commands/analyzer_status.ts
@@ -1,7 +1,7 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import { Server } from '../server'; 2import { Server } from '../server';
3 3
4const statusUri = vscode.Uri.parse('ra-lsp-status://status'); 4const statusUri = vscode.Uri.parse('rust-analyzer-status://status');
5 5
6export class TextDocumentContentProvider 6export class TextDocumentContentProvider
7 implements vscode.TextDocumentContentProvider { 7 implements vscode.TextDocumentContentProvider {
@@ -15,7 +15,10 @@ export class TextDocumentContentProvider
15 if (editor == null) { 15 if (editor == null) {
16 return ''; 16 return '';
17 } 17 }
18 return Server.client.sendRequest<string>('ra/analyzerStatus', null); 18 return Server.client.sendRequest<string>(
19 'rust-analyzer/analyzerStatus',
20 null
21 );
19 } 22 }
20 23
21 get onDidChange(): vscode.Event<vscode.Uri> { 24 get onDidChange(): vscode.Event<vscode.Uri> {
@@ -31,7 +34,7 @@ export function makeCommand(context: vscode.ExtensionContext) {
31 const textDocumentContentProvider = new TextDocumentContentProvider(); 34 const textDocumentContentProvider = new TextDocumentContentProvider();
32 context.subscriptions.push( 35 context.subscriptions.push(
33 vscode.workspace.registerTextDocumentContentProvider( 36 vscode.workspace.registerTextDocumentContentProvider(
34 'ra-lsp-status', 37 'rust-analyzer-status',
35 textDocumentContentProvider 38 textDocumentContentProvider
36 ) 39 )
37 ); 40 );
diff --git a/editors/code/src/commands/extend_selection.ts b/editors/code/src/commands/extend_selection.ts
index 7b96bbc37..6f4187d15 100644
--- a/editors/code/src/commands/extend_selection.ts
+++ b/editors/code/src/commands/extend_selection.ts
@@ -24,7 +24,7 @@ export async function handle() {
24 textDocument: { uri: editor.document.uri.toString() } 24 textDocument: { uri: editor.document.uri.toString() }
25 }; 25 };
26 const response = await Server.client.sendRequest<ExtendSelectionResult>( 26 const response = await Server.client.sendRequest<ExtendSelectionResult>(
27 'm/extendSelection', 27 'rust-analyzer/extendSelection',
28 request 28 request
29 ); 29 );
30 editor.selections = response.selections.map((range: Range) => { 30 editor.selections = response.selections.map((range: Range) => {
diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts
index 27d263b8a..0d4b12f4d 100644
--- a/editors/code/src/commands/join_lines.ts
+++ b/editors/code/src/commands/join_lines.ts
@@ -22,7 +22,7 @@ export async function handle() {
22 textDocument: { uri: editor.document.uri.toString() } 22 textDocument: { uri: editor.document.uri.toString() }
23 }; 23 };
24 const change = await Server.client.sendRequest<SourceChange>( 24 const change = await Server.client.sendRequest<SourceChange>(
25 'm/joinLines', 25 'rust-analyzer/joinLines',
26 request 26 request
27 ); 27 );
28 await applySourceChange(change); 28 await applySourceChange(change);
diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts
index 5e6638e82..d86faf405 100644
--- a/editors/code/src/commands/matching_brace.ts
+++ b/editors/code/src/commands/matching_brace.ts
@@ -20,7 +20,7 @@ export async function handle() {
20 }) 20 })
21 }; 21 };
22 const response = await Server.client.sendRequest<Position[]>( 22 const response = await Server.client.sendRequest<Position[]>(
23 'm/findMatchingBrace', 23 'rust-analyzer/findMatchingBrace',
24 request 24 request
25 ); 25 );
26 editor.selections = editor.selections.map((sel, idx) => { 26 editor.selections = editor.selections.map((sel, idx) => {
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts
index bb376e3cb..16dcb70c8 100644
--- a/editors/code/src/commands/on_enter.ts
+++ b/editors/code/src/commands/on_enter.ts
@@ -22,7 +22,7 @@ export async function handle(event: { text: string }): Promise<boolean> {
22 ) 22 )
23 }; 23 };
24 const change = await Server.client.sendRequest<undefined | SourceChange>( 24 const change = await Server.client.sendRequest<undefined | SourceChange>(
25 'm/onEnter', 25 'rust-analyzer/onEnter',
26 request 26 request
27 ); 27 );
28 if (!change) { 28 if (!change) {
diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts
index 806c3d34c..9d30b7b59 100644
--- a/editors/code/src/commands/parent_module.ts
+++ b/editors/code/src/commands/parent_module.ts
@@ -15,7 +15,7 @@ export async function handle() {
15 ) 15 )
16 }; 16 };
17 const response = await Server.client.sendRequest<lc.Location[]>( 17 const response = await Server.client.sendRequest<lc.Location[]>(
18 'm/parentModule', 18 'rust-analyzer/parentModule',
19 request 19 request
20 ); 20 );
21 const loc = response[0]; 21 const loc = response[0];
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index aa5817c21..d9ae56420 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -83,7 +83,7 @@ export async function handle() {
83 ) 83 )
84 }; 84 };
85 const runnables = await Server.client.sendRequest<Runnable[]>( 85 const runnables = await Server.client.sendRequest<Runnable[]>(
86 'm/runnables', 86 'rust-analyzer/runnables',
87 params 87 params
88 ); 88 );
89 const items: RunnableQuickPick[] = []; 89 const items: RunnableQuickPick[] = [];
diff --git a/editors/code/src/commands/syntaxTree.ts b/editors/code/src/commands/syntaxTree.ts
index 5d5cdd7a0..c0baf08c5 100644
--- a/editors/code/src/commands/syntaxTree.ts
+++ b/editors/code/src/commands/syntaxTree.ts
@@ -3,7 +3,7 @@ import { TextDocumentIdentifier } from 'vscode-languageclient';
3 3
4import { Server } from '../server'; 4import { Server } from '../server';
5 5
6export const syntaxTreeUri = vscode.Uri.parse('ra-lsp://syntaxtree'); 6export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree');
7 7
8export class TextDocumentContentProvider 8export class TextDocumentContentProvider
9 implements vscode.TextDocumentContentProvider { 9 implements vscode.TextDocumentContentProvider {
@@ -21,7 +21,7 @@ export class TextDocumentContentProvider
21 textDocument: { uri: editor.document.uri.toString() } 21 textDocument: { uri: editor.document.uri.toString() }
22 }; 22 };
23 return Server.client.sendRequest<SyntaxTreeResult>( 23 return Server.client.sendRequest<SyntaxTreeResult>(
24 'm/syntaxTree', 24 'rust-analyzer/syntaxTree',
25 request 25 request
26 ); 26 );
27 } 27 }