diff --git a/package.json b/package.json index a6acedc8..eec10701 100644 --- a/package.json +++ b/package.json @@ -329,6 +329,11 @@ "default": true, "description": "Should state be shown?" }, + "vscord.status.state.debugging.enabled": { + "type": "boolean", + "default": true, + "description": "Should state be shown when debugging? If disabled, it will be shown when editing/viewing a file." + }, "vscord.status.state.idle.enabled": { "type": "boolean", "default": true, diff --git a/src/activity.ts b/src/activity.ts index 67d0f470..da2953d2 100644 --- a/src/activity.ts +++ b/src/activity.ts @@ -124,7 +124,7 @@ export const activity = async ( const isNotInFile = !isWorkspaceExcluded && !dataClass.editor; - const isDebugging = !!debug.activeDebugSession; + const isDebugging = config.get(CONFIG_KEYS.Status.State.Debugging.Enabled) && !!debug.activeDebugSession; isViewing = !isDebugging && isViewing; let status: CURRENT_STATUS; @@ -453,7 +453,7 @@ export const replaceFileInfo = async ( if (dataClass.editor && dataClass.workspaceName && !excluded) { const name = dataClass.workspaceName; - relativeFilepath = workspace.asRelativePath(dataClass.editor.document.fileName) + relativeFilepath = workspace.asRelativePath(dataClass.editor.document.fileName); const relativePath = workspace.asRelativePath(dataClass.editor.document.fileName).split(sep); relativePath.splice(-1, 1); diff --git a/src/config.ts b/src/config.ts index 3e31809d..884e3c95 100644 --- a/src/config.ts +++ b/src/config.ts @@ -2,7 +2,6 @@ import { workspace, type ConfigurationTarget, type WorkspaceConfiguration } from "vscode"; import { type PROBLEM_LEVEL } from "./activity"; - export type FileSizeStandard = "iec" | "jedec"; export interface ExtensionConfigurationType { @@ -21,6 +20,7 @@ export interface ExtensionConfigurationType { "status.details.text.notInFile": string; "status.details.text.noWorkSpaceText": string; "status.state.enabled": boolean; + "status.state.debugging.enabled": boolean; "status.state.idle.enabled": boolean; "status.state.text.idle": string; "status.state.text.viewing": string; diff --git a/src/constants.ts b/src/constants.ts index 670f6e26..d04efc1e 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -35,6 +35,9 @@ export const CONFIG_KEYS = { } as const, State: { Enabled: "status.state.enabled" as const, + Debugging: { + Enabled: "status.state.debugging.enabled" as const + } as const, Idle: { Enabled: "status.state.idle.enabled" as const } as const,