update
Update a configuration value. The updated configuration values are persisted.
A value can be changed in
Global settings: Changes the value for all instances of the editor.
Workspace settings: Changes the value for current workspace, if available.
Workspace folder settings}: Changes the value for settings from one of the {@link workspace.workspaceFolders Workspace Folders under which the requested resource belongs to.
Language settings: Changes the value for the requested languageId.
Note: To remove a configuration value use undefined
, like so: config.update('somekey', undefined)
Parameters
Configuration name, supports dotted names.
The new value.
The configuration target or a boolean value. - If true
updates ConfigurationTarget.Global. - If false
updates Workspace settings. - If undefined
or null
updates to ConfigurationTarget.WorkspaceFolder if configuration is resource specific, otherwise to Workspace settings.
Whether to update the value in the scope of requested languageId or not. - If true
updates the value under the requested languageId. - If undefined
updates the value under the requested languageId only if the configuration is defined for the language.
Throws
while updating - configuration which is not registered. - window configuration to workspace folder - configuration to workspace or workspace folder when no workspace is opened. - configuration to workspace folder when there is no workspace folder settings. - configuration to workspace folder when WorkspaceConfiguration is not scoped to a resource.