about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2022-09-20 17:39:17 +0300
committerLaurențiu Nicola <lnicola@dend.ro>2022-09-20 17:39:17 +0300
commitf5fde4df43fa9a6cf929b1cb0f6ab8233a4be4dc (patch)
treeca3befe329ebfd971be41838baaf2524b76a45e4 /editors/code/src
parent459bbb42223c7258ec6801a54c95902074d5596a (diff)
downloadrust-f5fde4df43fa9a6cf929b1cb0f6ab8233a4be4dc.tar.gz
rust-f5fde4df43fa9a6cf929b1cb0f6ab8233a4be4dc.zip
:arrow_up: rust-analyzer
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands.ts24
-rw-r--r--editors/code/src/main.ts1
2 files changed, 0 insertions, 25 deletions
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<string, string> = {
-            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);