Allow the language key to be added to the largeImage (#39)
Naming for the params can be changed, but as it currently stands, it represents the language extension
This commit is contained in:
parent
06be6e722d
commit
e83619ae37
2 changed files with 3 additions and 3 deletions
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue