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

Elio Struyf @estruyf

About: Elio Struyf is an independent Solutions Architect, Blogger, and Speaker. Loves stickers - if you want stickers, get them at https://pyod.shop.

Location:
Antwerp
Joined:
Jul 10, 2020

#DevHack: Open your VSCode extension settings from the code

Publish Date: Feb 26 '21
8 0

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

Comments 0 total

    Add comment