Readable dictionary that backs this configuration.
Global configuration comes from User Settings and shadows Defaults.
Workspace configuration comes from Workspace Settings and shadows Global configuration.
Workspace Folder configuration comes from .vscode folder under one of the workspace folders.
Note: Workspace and Workspace Folder configurations contains launch and tasks settings. Their basename will be
part of the section identifier. The following snippets shows how to retrieve all configurations
from launch.json:
// launch.json configuration
const config = workspace.getConfiguration('launch', vscode.window.activeTextEditor.document.uri);
// retrieve values
const values = config.get('configurations');
Refer to Settings for more information.
Return a value from this configuration.
Configuration name, supports dotted names.
The value section denotes or undefined.
Return a value from this configuration.
Configuration name, supports dotted names.
A value should be returned when no value could be found, is undefined.
The value section denotes or the default.
Check if this configuration has a certain value.
Configuration name, supports dotted names.
true if the section doesn't resolve to undefined.
Retrieve all information about a configuration setting. A configuration value often consists of a default value, a global or installation-wide value, a workspace-specific value and a folder-specific value.
The effective value (returned by get)
is computed like this: defaultValue overwritten by globalValue,
globalValue overwritten by workspaceValue. workspaceValue overwritten by workspaceFolderValue.
Refer to Settings Inheritence
for more information.
Note: The configuration name must denote a leaf in the configuration tree
(editor.fontSize vs editor) otherwise no result is returned.
Configuration name, supports dotted names.
Information about a configuration setting or undefined.
Update a configuration value. The updated configuration values are persisted.
A value can be changed in
Note 1: Setting a global value in the presence of a more specific workspace value has no observable effect in that workspace, but in others. Setting a workspace value in the presence of a more specific folder value has no observable effect for the resources under respective folder, but in others. Refer to Settings Inheritence for more information.
Note 2: To remove a configuration value use undefined, like so: config.update('somekey', undefined)
Will throw error when
workspace.getConfiguration(section, resource))Configuration name, supports dotted names.
The new value.
The configuration target or a boolean value.
true configuration target is ConfigurationTarget.Global.false configuration target is ConfigurationTarget.Workspace.undefined or null configuration target is
ConfigurationTarget.WorkspaceFolder when configuration is resource specific
ConfigurationTarget.Workspace otherwise.
Represents the configuration. It is a merged view of
Global configuration comes from User Settings and shadows Defaults.
Workspace configuration comes from Workspace Settings and shadows Global configuration.
Workspace Folder configuration comes from
.vscodefolder under one of the workspace folders.Note: Workspace and Workspace Folder configurations contains
launchandtaskssettings. Their basename will be part of the section identifier. The following snippets shows how to retrieve all configurations fromlaunch.json:// launch.json configuration const config = workspace.getConfiguration('launch', vscode.window.activeTextEditor.document.uri); // retrieve values const values = config.get('configurations');Refer to Settings for more information.