aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/extension.ts
diff options
context:
space:
mode:
authorBernardo <[email protected]>2019-04-19 17:28:14 +0100
committerBernardo <[email protected]>2019-04-19 19:54:36 +0100
commit422f4ac080c1347421a1ba6efcbc8f5b40414f46 (patch)
tree01c72b5c48746b5dfb9b1155375cb86c631f7290 /editors/code/src/extension.ts
parent3d3adabbef9290097fd890218d5d8ea6c1d8c002 (diff)
start cargo watch if not started interactively
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r--editors/code/src/extension.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts
index b48ad9b29..48dd2a614 100644
--- a/editors/code/src/extension.ts
+++ b/editors/code/src/extension.ts
@@ -3,7 +3,10 @@ import * as lc from 'vscode-languageclient';
3 3
4import * as commands from './commands'; 4import * as commands from './commands';
5import { CargoWatchProvider } from './commands/cargo_watch'; 5import { CargoWatchProvider } from './commands/cargo_watch';
6import { interactivelyStartCargoWatch } from './commands/runnables'; 6import {
7 interactivelyStartCargoWatch,
8 startCargoWatch
9} from './commands/runnables';
7import { SyntaxTreeContentProvider } from './commands/syntaxTree'; 10import { SyntaxTreeContentProvider } from './commands/syntaxTree';
8import * as events from './events'; 11import * as events from './events';
9import * as notifications from './notifications'; 12import * as notifications from './notifications';
@@ -134,6 +137,10 @@ export function activate(context: vscode.ExtensionContext) {
134 registerCommand('rust-analyzer.startCargoWatch', () => { 137 registerCommand('rust-analyzer.startCargoWatch', () => {
135 if (provider) { 138 if (provider) {
136 provider.start(); 139 provider.start();
140 } else {
141 startCargoWatch(context).then(p => {
142 provider = p;
143 });
137 } 144 }
138 }); 145 });
139 registerCommand('rust-analyzer.stopCargoWatch', () => { 146 registerCommand('rust-analyzer.stopCargoWatch', () => {