#DevHack: Open your VSCode extension settings from the code

VSCode Extensions
post

This post is over a year old, some of this information may be out of date.

For my VSCode Front Matter extension, I wanted to implement a link that allows you to open the VSCode settings to the extension quickly.

Show image Front Matter - Quick link to settings
Front Matter - Quick link to settings

I could not find anything in the documentation but found a reference on Stackoverflow mentioning you could use: vscode.commands.executeCommand( 'workbench.action.openSettings', '<your extension>' );.

Using my extension ID was not working correctly. So I did some more digging in VSCode, and it seems you have to add @ext:<your extension id>. In the case of my Front Matter extension this is:

vscode.commands.executeCommand('workbench.action.openSettings', '@ext:eliostruyf.vscode-front-matter');

Want the next article?

Subscribe to the RSS feed, or follow me where I share new posts.

Related articles

Report issues or make changes on GitHub

Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.

Comments

Elio Struyf

I build developer tools · Microsoft 365 architect · Speaker

Loading...

Let's build together

All your AI coding agents in one window

Present from VS Code

Manage content in VS Code

See all my projects →