aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/extension.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r--editors/code/src/extension.ts25
1 files changed, 0 insertions, 25 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts
index 815f3692c..72a4d4bf2 100644
--- a/editors/code/src/extension.ts
+++ b/editors/code/src/extension.ts
@@ -2,13 +2,8 @@ import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3 3
4import * as commands from './commands'; 4import * as commands from './commands';
5import { CargoWatchProvider } from './commands/cargo_watch';
6import { ExpandMacroContentProvider } from './commands/expand_macro'; 5import { ExpandMacroContentProvider } from './commands/expand_macro';
7import { HintsUpdater } from './commands/inlay_hints'; 6import { HintsUpdater } from './commands/inlay_hints';
8import {
9 interactivelyStartCargoWatch,
10 startCargoWatch,
11} from './commands/runnables';
12import { SyntaxTreeContentProvider } from './commands/syntaxTree'; 7import { SyntaxTreeContentProvider } from './commands/syntaxTree';
13import * as events from './events'; 8import * as events from './events';
14import * as notifications from './notifications'; 9import * as notifications from './notifications';
@@ -139,26 +134,6 @@ export async function activate(context: vscode.ExtensionContext) {
139 134
140 vscode.commands.registerCommand('rust-analyzer.reload', reloadCommand); 135 vscode.commands.registerCommand('rust-analyzer.reload', reloadCommand);
141 136
142 // Executing `cargo watch` provides us with inline diagnostics on save
143 let provider: CargoWatchProvider | undefined;
144 interactivelyStartCargoWatch(context).then(p => {
145 provider = p;
146 });
147 registerCommand('rust-analyzer.startCargoWatch', () => {
148 if (provider) {
149 provider.start();
150 } else {
151 startCargoWatch(context).then(p => {
152 provider = p;
153 });
154 }
155 });
156 registerCommand('rust-analyzer.stopCargoWatch', () => {
157 if (provider) {
158 provider.stop();
159 }
160 });
161
162 // Start the language server, finally! 137 // Start the language server, finally!
163 try { 138 try {
164 await startServer(); 139 await startServer();