Open DanTup opened 2 months ago
This appears to work:
await vs.commands.executeCommand("workbench.action.openWorkspaceSettings", {
query: 'window.zoomLevel'
// target: vs.ConfigurationTarget.Workspace,
});
@ArturoDent I think that only works if you haven't changed your settings to default to the JSON editor though, otherwise it'll open the JSON editor. I want to force the UI regardless of the user preference because otherwise if the user hasn't already defined the setting, they will just end up at a blank json file.
I'm like to pop open the settings editor for a specific setting, but for the current workspace. Eg, this view:
I'm using the
workbench.action.openSettings2
command (to force the UI regardless of user settings) and passing aquery
. I'm also passing atarget
(which I found inISettingsEditorOptions
alongsidequery
), however it seems to be ignored and just opens at the user settings:I also tried passing
5
instead ofvs.ConfigurationTarget.Workspace,
because there's anotherConfigurationTarget
enum inside VS Code defined as:However, nothing works. I saw there as a new
vscode://settings/xxx
handler in the latest VS Code, but it doesn't seem to have any option for workspace settings.Is this a bug? Is there a way to do the equiv of "Open Workspace Settings" and force the UI, and provide a query?