Rich Presence for Workspaces
Show your VS Code coding activity as a Discord rich presence, and only for the projects you choose.
What the card looks like
Playing
+----------+ <your application name>
| app icon | Dang sua: extension.ts
| | typescript - my-project
+----------+ 12:34
The bold line is the name of the application you create in the Discord developer portal. The square image is that application's icon. The two lines below are sent by this extension and follow the file you have open.
Features
- Connects on startup, updates when you switch or save a file
- Per-workspace filter, so your other projects stay private
- Reconnects automatically when the desktop client restarts, 5s to 60s backoff
- Activity type: Playing, Listening to, Watching or Competing in
- Language emoji for 24 or more languages
- Optional language badge and up to 2 custom buttons
- Status bar toggle
Setup
- Open the Discord developer portal and create a new application
- Give it a name and an icon. The name is what shows in bold on the card
- Copy its Application ID
- In VS Code settings, paste it into
discordStatus.clientId
The status bar then shows a checkmark next to Discord.
Settings
| Setting |
Default |
What it does |
discordStatus.clientId |
"" |
Required. Application ID of your own application |
discordStatus.autoConnect |
true |
Connect when VS Code starts |
discordStatus.onlyInWorkspaces |
["*"] |
Workspace whitelist |
discordStatus.activityType |
playing |
playing, listening, watching, competing |
discordStatus.showFileName |
true |
Show the open file name |
discordStatus.showLanguage |
true |
Show the language |
discordStatus.showLanguageBadge |
true |
Small language badge, needs an art asset |
discordStatus.idleText |
Dang code |
Text when no file is open |
discordStatus.largeImageKey |
"" |
Large image asset, empty uses the app icon |
discordStatus.buttons |
[] |
Up to 2 buttons |
Workspace filter
"discordStatus.onlyInWorkspaces": ["*"] // every workspace
"discordStatus.onlyInWorkspaces": ["my-app", "side-proj"] // only these
"discordStatus.onlyInWorkspaces": [] // off everywhere
A window that does not match never opens a connection, so several VS Code windows will not fight over the presence.
Language badge
Upload an art asset named after the language id: typescript, python, rust, go, java, csharp, cpp, php, ruby, html, css, vue, json, yaml, sql, markdown, shell, docker. Without the asset it is simply ignored.
Requirements
- The desktop client must be running. The web client has no IPC
- VS Code 1.75 or newer
Troubleshooting
Not connecting. Check that the desktop client is open and that you pasted a client id. On Windows, do not run VS Code or the client as Administrator, that blocks IPC. On Linux, the snap and flatpak builds do not support IPC.
Status bar shows a slashed circle. The current workspace is not in discordStatus.onlyInWorkspaces.
Nothing shows up. In the client, open User Settings, Activity Privacy, and enable displaying your current activity as a status message.
License
MIT