You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/vs/vscode.d.ts
+91-47Lines changed: 91 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -4240,24 +4240,60 @@ declare module 'vscode' {
4240
4240
/**
4241
4241
* Represents the configuration. It is a merged view of
4242
4242
*
4243
-
* - Default configuration
4244
-
* - Global configuration
4245
-
* - Workspace configuration (if available)
4246
-
* - Workspace folder configuration of the requested resource (if available)
4243
+
* - *Default Settings*
4244
+
* - *Global (User) Settings*
4245
+
* - *Workspace settings*
4246
+
* - *Workspace Folder settings* - From one of the [Workspace Folders](#workspace.workspaceFolders) under which requested resource belongs to.
4247
+
* - *Language settings* - Settings defined under requested language.
4247
4248
*
4248
-
* *Global configuration* comes from User Settings and overrides Defaults.
4249
+
* The *effective* value (returned by [`get`](#WorkspaceConfiguration.get)) is computed by overriding or merging the values in the following order.
4249
4250
*
4250
-
* *Workspace configuration* comes from Workspace Settings and overrides Global configuration.
4251
+
* ```
4252
+
* `defaultValue`
4253
+
* `globalValue` (if defined)
4254
+
* `workspaceValue` (if defined)
4255
+
* `workspaceFolderValue` (if defined)
4256
+
* `defaultLanguageValue` (if defined)
4257
+
* `globalLanguageValue` (if defined)
4258
+
* `workspaceLanguageValue` (if defined)
4259
+
* `workspaceLanguageValue` (if defined)
4260
+
* ```
4261
+
* **Note:** Only `object` value types are merged and all other value types are overridden.
4262
+
*
4263
+
* Example 1: Overriding
4264
+
*
4265
+
* ```ts
4266
+
* defaultValue = 'on';
4267
+
* globalValue = 'relative'
4268
+
* workspaceFolderValue = 'off'
4269
+
* value = 'off'
4270
+
* ```
4251
4271
*
4252
-
* *Workspace Folder configuration* comes from `.vscode` folder under one of the [workspace folders](#workspace.workspaceFolders) and overrides Workspace configuration.
4272
+
* Example 2: Language Values
4273
+
*
4274
+
* ```ts
4275
+
* defaultValue = 'on';
4276
+
* globalValue = 'relative'
4277
+
* workspaceFolderValue = 'off'
4278
+
* globalLanguageValue = 'on'
4279
+
* value = 'on'
4280
+
* ```
4281
+
*
4282
+
* Example 3: Object Values
4283
+
*
4284
+
* ```ts
4285
+
* defaultValue = { "a": 1, "b": 2 };
4286
+
* globalValue = { "b": 3, "c": 4 };
4287
+
* value = { "a": 1, "b": 3, "c": 4 };
4288
+
* ```
4253
4289
*
4254
4290
* *Note:* Workspace and Workspace Folder configurations contains `launch` and `tasks` settings. Their basename will be
4255
4291
* part of the section identifier. The following snippets shows how to retrieve all configurations
* Update a configuration value. The updated configuration values are persisted.
4316
4364
*
4317
4365
* A value can be changed in
4318
4366
*
4319
-
* - [Global configuration](#ConfigurationTarget.Global): Changes the value for all instances of the editor.
4320
-
* - [Workspace configuration](#ConfigurationTarget.Workspace): Changes the value for current workspace, if available.
4321
-
* - [Workspace folder configuration](#ConfigurationTarget.WorkspaceFolder): Changes the value for the
4322
-
* [Workspace folder](#workspace.workspaceFolders) to which the current [configuration](#WorkspaceConfiguration) is scoped to.
4323
-
*
4324
-
* *Note 1:* Setting a global value in the presence of a more specific workspace value
4325
-
* has no observable effect in that workspace, but in others. Setting a workspace value
4326
-
* in the presence of a more specific folder value has no observable effect for the resources
4327
-
* under respective [folder](#workspace.workspaceFolders), but in others. Refer to
4328
-
* [Settings Inheritance](https://code.visualstudio.com/docs/getstarted/settings) for more information.
4329
-
*
4330
-
* *Note 2:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)`
4367
+
* - [Global settings](#ConfigurationTarget.Global): Changes the value for all instances of the editor.
4368
+
* - [Workspace settings](#ConfigurationTarget.Workspace): Changes the value for current workspace, if available.
4369
+
* - [Workspace folder settings](#ConfigurationTarget.WorkspaceFolder): Changes the value for settings from one of the [Workspace Folders](#workspace.workspaceFolders) under which the requested resource belongs to.
4370
+
* - Language settings: Changes the value for the requested languageId.
4331
4371
*
4332
-
* Will throw error when
4333
-
* - Writing a configuration which is not registered.
4334
-
* - Writing a configuration to workspace or folder target when no workspace is opened
4335
-
* - Writing a configuration to folder target when there is no folder settings
4336
-
* - Writing to folder target without passing a resource when getting the configuration (`workspace.getConfiguration(section, resource)`)
4337
-
* - Writing a window configuration to folder target
4372
+
* *Note:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)`
0 commit comments