-
Notifications
You must be signed in to change notification settings - Fork 76
SettingsEditor
Jan Richter edited this page Aug 6, 2019
·
6 revisions
Settings editor can be opened through variety of ways, recommended way is using the Workbench class:
import { Workbench, SettingsEditor } from 'vscode-extension-tester'
...
const settingsEditor = await new Workbench().openSettings();
Search for a setting with a given name and category, see more about the Setting object:
// look for a setting named 'Auto Save' under 'Editor' category
const setting = await settingsEditor.findSetting('Auto Save', 'Editor');
VSCode has two perspectives for its settings: 'User' and 'Workspace'. If your VSCode instance loads from both user and workspace settings.json files, you will be able to switch the perspectives in the editor:
// switch to Workspace perspective
await settingsEditor.switchToPerspective('Workspace');