update

abstract fun update(section: String, value: JsAny?, configurationTarget: JsAny? = definedExternally, overrideInLanguage: Boolean = definedExternally): PromiseLike<Void?>(source)

Update a configuration value. The updated configuration values are persisted.

A value can be changed in

Note: To remove a configuration value use undefined, like so: config.update('somekey', undefined)

Parameters

section

Configuration name, supports dotted names.

value

The new value.

configurationTarget

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.

overrideInLanguage

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.

Online Documentation