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": {
|
"discord.largeImage": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "",
|
"default": "Editing a {LANG} file",
|
||||||
"description": "Custom string for the largeImageText section of the rich presence"
|
"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": {
|
"discord.largeImageIdle": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
@ -245,7 +245,7 @@ function setActivity(workspaceElapsedTime: boolean = false): void {
|
||||||
|| largeImageKey
|
|| largeImageKey
|
||||||
: 'txt',
|
: 'txt',
|
||||||
largeImageText: window.activeTextEditor
|
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')
|
|| window.activeTextEditor.document.languageId.padEnd(2, '\u200b')
|
||||||
: config.get('largeImageIdle'),
|
: config.get('largeImageIdle'),
|
||||||
smallImageKey: debug.activeDebugSession
|
smallImageKey: debug.activeDebugSession
|
||||||
|
|
Loading…
Reference in a new issue