From d1a67c1174abfb99b67b8db89c9f27c741e85057 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 28 Jan 2019 14:43:07 +0300 Subject: align command naming --- editors/code/src/commands/analyzer_status.ts | 9 ++++++--- editors/code/src/commands/extend_selection.ts | 2 +- editors/code/src/commands/join_lines.ts | 2 +- editors/code/src/commands/matching_brace.ts | 2 +- editors/code/src/commands/on_enter.ts | 2 +- editors/code/src/commands/parent_module.ts | 2 +- editors/code/src/commands/runnables.ts | 2 +- editors/code/src/commands/syntaxTree.ts | 4 ++-- 8 files changed, 14 insertions(+), 11 deletions(-) (limited to 'editors/code/src/commands') 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 @@ import * as vscode from 'vscode'; import { Server } from '../server'; -const statusUri = vscode.Uri.parse('ra-lsp-status://status'); +const statusUri = vscode.Uri.parse('rust-analyzer-status://status'); export class TextDocumentContentProvider implements vscode.TextDocumentContentProvider { @@ -15,7 +15,10 @@ export class TextDocumentContentProvider if (editor == null) { return ''; } - return Server.client.sendRequest('ra/analyzerStatus', null); + return Server.client.sendRequest( + 'rust-analyzer/analyzerStatus', + null + ); } get onDidChange(): vscode.Event { @@ -31,7 +34,7 @@ export function makeCommand(context: vscode.ExtensionContext) { const textDocumentContentProvider = new TextDocumentContentProvider(); context.subscriptions.push( vscode.workspace.registerTextDocumentContentProvider( - 'ra-lsp-status', + 'rust-analyzer-status', textDocumentContentProvider ) ); 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() { textDocument: { uri: editor.document.uri.toString() } }; const response = await Server.client.sendRequest( - 'm/extendSelection', + 'rust-analyzer/extendSelection', request ); 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() { textDocument: { uri: editor.document.uri.toString() } }; const change = await Server.client.sendRequest( - 'm/joinLines', + 'rust-analyzer/joinLines', request ); 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() { }) }; const response = await Server.client.sendRequest( - 'm/findMatchingBrace', + 'rust-analyzer/findMatchingBrace', request ); 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 { ) }; const change = await Server.client.sendRequest( - 'm/onEnter', + 'rust-analyzer/onEnter', request ); 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() { ) }; const response = await Server.client.sendRequest( - 'm/parentModule', + 'rust-analyzer/parentModule', request ); 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() { ) }; const runnables = await Server.client.sendRequest( - 'm/runnables', + 'rust-analyzer/runnables', params ); 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'; import { Server } from '../server'; -export const syntaxTreeUri = vscode.Uri.parse('ra-lsp://syntaxtree'); +export const syntaxTreeUri = vscode.Uri.parse('rust-analyzer://syntaxtree'); export class TextDocumentContentProvider implements vscode.TextDocumentContentProvider { @@ -21,7 +21,7 @@ export class TextDocumentContentProvider textDocument: { uri: editor.document.uri.toString() } }; return Server.client.sendRequest( - 'm/syntaxTree', + 'rust-analyzer/syntaxTree', request ); } -- cgit v1.2.3