diff --git a/editors/code/package.json b/editors/code/package.json index 767c5875bf7..023b4502091 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -206,11 +206,6 @@ "title": "Show RA Version", "category": "rust-analyzer" }, - { - "command": "rust-analyzer.toggleInlayHints", - "title": "Toggle inlay hints", - "category": "rust-analyzer" - }, { "command": "rust-analyzer.openDocs", "title": "Open docs under cursor", @@ -1633,10 +1628,6 @@ "command": "rust-analyzer.serverVersion", "when": "inRustProject" }, - { - "command": "rust-analyzer.toggleInlayHints", - "when": "inRustProject" - }, { "command": "rust-analyzer.openDocs", "when": "inRustProject" diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index a21b304bbda..b9ad525e361 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -321,30 +321,6 @@ export function serverVersion(ctx: Ctx): Cmd { }; } -export function toggleInlayHints(_ctx: Ctx): Cmd { - return async () => { - const config = vscode.workspace.getConfiguration("editor.inlayHints", { - languageId: "rust", - }); - - const value = config.get("enabled"); - let stringValue; - if (typeof value === "string") { - stringValue = value; - } else { - stringValue = value ? "on" : "off"; - } - const nextValues: Record = { - on: "off", - off: "on", - onUnlessPressed: "offUnlessPressed", - offUnlessPressed: "onUnlessPressed", - }; - const nextValue = nextValues[stringValue] ?? "on"; - await config.update("enabled", nextValue, vscode.ConfigurationTarget.Global); - }; -} - // Opens the virtual file that will show the syntax tree // // The contents of the file come from the `TextDocumentContentProvider` diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index e9b62e0cc25..41bde4195e0 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -180,7 +180,6 @@ async function initCommonContext(context: vscode.ExtensionContext, ctx: Ctx) { ctx.registerCommand("ssr", commands.ssr); ctx.registerCommand("serverVersion", commands.serverVersion); - ctx.registerCommand("toggleInlayHints", commands.toggleInlayHints); // Internal commands which are invoked by the server. ctx.registerCommand("runSingle", commands.runSingle);