diff --git a/package.json b/package.json index f582bee..fa298d2 100644 --- a/package.json +++ b/package.json @@ -91,8 +91,8 @@ }, "discord.largeImage": { "type": "string", - "default": "", - "description": "Custom string for the largeImageText section of the rich presence" + "default": "Editing a {LANG} file", + "description": "Custom string for the largeImageText section of the rich presence.\n\t- '{lang}' will be replaced with the lowercased language ID\n\t- '{LANG}' will be replaced with the uppercased language ID" }, "discord.largeImageIdle": { "type": "string", diff --git a/src/extension.ts b/src/extension.ts index e23be66..5249a40 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -245,7 +245,7 @@ function setActivity(workspaceElapsedTime: boolean = false): void { || largeImageKey : 'txt', largeImageText: window.activeTextEditor - ? config.get('largeImage') + ? config.get('largeImage').replace('{lang}', largeImageKey.image || largeImageKey).replace('{LANG}', largeImageKey.image.toUpperCase() || largeImageKey.toUpperCase()) || window.activeTextEditor.document.languageId.padEnd(2, '\u200b') : config.get('largeImageIdle'), smallImageKey: debug.activeDebugSession