Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts13
1 files changed, 2 insertions, 11 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 0fb0a1f17c..e55754fb9f 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -1,7 +1,6 @@
import * as vscode from "vscode";
import type * as lc from "vscode-languageclient/node";
import * as ra from "./lsp_ext";
-import * as commands from "./commands";
import { Config, prepareVSCodeConfig } from "./config";
import { createClient } from "./client";
@@ -463,17 +462,9 @@ export class Ctx implements RustAnalyzerExtensionApi {
for (const [name, factory] of Object.entries(this.commandFactories)) {
const fullName = `rust-analyzer.${name}`;
let callback;
-
if (isClientRunning(this)) {
- if (name === "run") {
- // Special case: support optional argument for `run`
- callback = (mode?: "cursor") => {
- return commands.run(this, mode)();
- };
- } else {
- // we asserted that `client` is defined
- callback = factory.enabled(this);
- }
+ // we asserted that `client` is defined
+ callback = factory.enabled(this);
} else if (factory.disabled) {
callback = factory.disabled(this);
} else {