aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/package.json5
-rw-r--r--editors/code/src/commands/index.ts1
-rw-r--r--editors/code/src/commands/server_version.ts9
-rw-r--r--editors/code/src/main.ts1
4 files changed, 16 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index c498c14b4..72befe2b6 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -131,6 +131,11 @@
131 "command": "rust-analyzer.ssr", 131 "command": "rust-analyzer.ssr",
132 "title": "Structural Search Replace", 132 "title": "Structural Search Replace",
133 "category": "Rust Analyzer" 133 "category": "Rust Analyzer"
134 },
135 {
136 "command": "rust-analyzer.serverVersion",
137 "title": "Show RA Version",
138 "category": "Rust Analyzer"
134 } 139 }
135 ], 140 ],
136 "keybindings": [ 141 "keybindings": [
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index bebd99ca9..839245f48 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/commands/index.ts
@@ -13,6 +13,7 @@ export * from './syntax_tree';
13export * from './expand_macro'; 13export * from './expand_macro';
14export * from './runnables'; 14export * from './runnables';
15export * from './ssr'; 15export * from './ssr';
16export * from './server_version';
16 17
17export function collectGarbage(ctx: Ctx): Cmd { 18export function collectGarbage(ctx: Ctx): Cmd {
18 return async () => { 19 return async () => {
diff --git a/editors/code/src/commands/server_version.ts b/editors/code/src/commands/server_version.ts
new file mode 100644
index 000000000..3a982a418
--- /dev/null
+++ b/editors/code/src/commands/server_version.ts
@@ -0,0 +1,9 @@
1import * as vscode from 'vscode';
2import { ServerVersion } from '../installation/server';
3import { Cmd } from '../ctx';
4
5export function serverVersion(): Cmd {
6 return () => {
7 vscode.window.showInformationMessage('rust-analyzer version : ' + ServerVersion);
8 };
9} \ No newline at end of file
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index a22e0bc66..de19a44e5 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -55,6 +55,7 @@ export async function activate(context: vscode.ExtensionContext) {
55 ctx.registerCommand('run', commands.run); 55 ctx.registerCommand('run', commands.run);
56 ctx.registerCommand('onEnter', commands.onEnter); 56 ctx.registerCommand('onEnter', commands.onEnter);
57 ctx.registerCommand('ssr', commands.ssr); 57 ctx.registerCommand('ssr', commands.ssr);
58 ctx.registerCommand('serverVersion', commands.serverVersion);
58 59
59 // Internal commands which are invoked by the server. 60 // Internal commands which are invoked by the server.
60 ctx.registerCommand('runSingle', commands.runSingle); 61 ctx.registerCommand('runSingle', commands.runSingle);