DEV Community

Cover image for #DevHack: Open your VSCode extension settings from the code
Elio Struyf
Elio Struyf

Posted on

3 3

#DevHack: Open your VSCode extension settings from the code

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

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');
Enter fullscreen mode Exit fullscreen mode

First published on: https://www.eliostruyf.com

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay