diff options
author | Bernardo <[email protected]> | 2019-04-13 21:13:21 +0100 |
---|---|---|
committer | Bernardo <[email protected]> | 2019-04-19 19:54:36 +0100 |
commit | 1ae6571762cab605a84a731e10c89d8f3f00eef8 (patch) | |
tree | 1b73640a2f9e2e2ee85d06cf56994ee6fe97a5f0 /editors/code/src/commands/runnables.ts | |
parent | 0d39b1c3fa03a8032ea96be922fd62710f811aba (diff) |
cargo watch start and stop commands
Diffstat (limited to 'editors/code/src/commands/runnables.ts')
-rw-r--r-- | editors/code/src/commands/runnables.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts index c4df24c79..5790252b7 100644 --- a/editors/code/src/commands/runnables.ts +++ b/editors/code/src/commands/runnables.ts | |||
@@ -5,7 +5,7 @@ import * as vscode from 'vscode'; | |||
5 | import * as lc from 'vscode-languageclient'; | 5 | import * as lc from 'vscode-languageclient'; |
6 | 6 | ||
7 | import { Server } from '../server'; | 7 | import { Server } from '../server'; |
8 | import { CargoWatchProvider } from './cargo_watch'; | 8 | import { CargoWatchProvider, registerCargoWatchProvider } from './cargo_watch'; |
9 | 9 | ||
10 | interface RunnablesParams { | 10 | interface RunnablesParams { |
11 | textDocument: lc.TextDocumentIdentifier; | 11 | textDocument: lc.TextDocumentIdentifier; |
@@ -137,7 +137,7 @@ export async function handleSingle(runnable: Runnable) { | |||
137 | */ | 137 | */ |
138 | export async function interactivelyStartCargoWatch( | 138 | export async function interactivelyStartCargoWatch( |
139 | context: vscode.ExtensionContext | 139 | context: vscode.ExtensionContext |
140 | ) { | 140 | ): Promise<CargoWatchProvider | undefined> { |
141 | if (Server.config.cargoWatchOptions.enableOnStartup === 'disabled') { | 141 | if (Server.config.cargoWatchOptions.enableOnStartup === 'disabled') { |
142 | return; | 142 | return; |
143 | } | 143 | } |
@@ -197,6 +197,5 @@ export async function interactivelyStartCargoWatch( | |||
197 | } | 197 | } |
198 | } | 198 | } |
199 | 199 | ||
200 | const validater = new CargoWatchProvider(); | 200 | return registerCargoWatchProvider(context.subscriptions); |
201 | validater.activate(context.subscriptions); | ||
202 | } | 201 | } |