From 3aaae1e917fd6224c788ec762b982528c0a98867 Mon Sep 17 00:00:00 2001 From: Naoto Ono Date: Sat, 3 Jun 2023 13:44:02 +0900 Subject: [PATCH] Add the ability to hide the #class item for each object Closes ruby/vscode-rdbg#37 We can hide the #class item for each object by setting true in hideClassItem --- package.json | 5 +++++ src/extension.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/package.json b/package.json index 0c33c660..c0b8ab29 100644 --- a/package.json +++ b/package.json @@ -234,6 +234,11 @@ "none" ], "default": "none" + }, + "rdbg.hideClassItem": { + "type": "boolean", + "default": false, + "description": "Hide the #class item for each object in VARIABLES view" } } }, diff --git a/src/extension.ts b/src/extension.ts index 959bc14c..5067079a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -205,6 +205,11 @@ class RdbgInitialConfigurationProvider implements vscode.DebugConfigurationProvi config.rdbgExtensions = extensions; config.rdbgInitialScripts = []; // for future extension + const hideClassItem = vscode.workspace.getConfiguration("rdbg").get("hideClassItem"); + if (hideClassItem) { + config.hideClassItem = true; + } + if (config.script || config.request === "attach") { return config; }