Liking cljdoc? Tell your friends :D
ClojureScript only.

dots.vscode.workspace-configuration

Represents the configuration. It is a merged view of

  • Default Settings
  • Global (User) Settings
  • Workspace settings
  • Workspace Folder settings - From one of the {@link workspace.workspaceFolders Workspace Folders} under which requested resource belongs to.
  • Language settings - Settings defined under requested language.

The effective value (returned by {@linkcode WorkspaceConfiguration.get get}) is computed by overriding or merging the values in the following order:

  1. defaultValue (if defined in package.json otherwise derived from the value's type)
  2. globalValue (if defined)
  3. workspaceValue (if defined)
  4. workspaceFolderValue (if defined)
  5. defaultLanguageValue (if defined)
  6. globalLanguageValue (if defined)
  7. workspaceLanguageValue (if defined)
  8. workspaceFolderLanguageValue (if defined)

Note: Only object value types are merged and all other value types are overridden.

Example 1: Overriding

defaultValue = 'on';
globalValue = 'relative'
workspaceFolderValue = 'off'
value = 'off'

Example 2: Language Values

defaultValue = 'on';
globalValue = 'relative'
workspaceFolderValue = 'off'
globalLanguageValue = 'on'
value = 'on'

Example 3: Object Values

defaultValue = { "a": 1, "b": 2 };
globalValue = { "b": 3, "c": 4 };
value = { "a": 1, "b": 3, "c": 4 };

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.workspace.workspaceFolders[0].uri);

// retrieve values
const values = config.get('configurations');

Refer to Settings for more information.

Represents the configuration. It is a merged view of

- *Default Settings*
- *Global (User) Settings*
- *Workspace settings*
- *Workspace Folder settings* - From one of the {@link workspace.workspaceFolders Workspace Folders} under which requested resource belongs to.
- *Language settings* - Settings defined under requested language.

The *effective* value (returned by {@linkcode WorkspaceConfiguration.get get}) is computed by overriding or merging the values in the following order:

1. `defaultValue` (if defined in `package.json` otherwise derived from the value's type)
1. `globalValue` (if defined)
1. `workspaceValue` (if defined)
1. `workspaceFolderValue` (if defined)
1. `defaultLanguageValue` (if defined)
1. `globalLanguageValue` (if defined)
1. `workspaceLanguageValue` (if defined)
1. `workspaceFolderLanguageValue` (if defined)

**Note:** Only `object` value types are merged and all other value types are overridden.

Example 1: Overriding

```ts
defaultValue = 'on';
globalValue = 'relative'
workspaceFolderValue = 'off'
value = 'off'
```

Example 2: Language Values

```ts
defaultValue = 'on';
globalValue = 'relative'
workspaceFolderValue = 'off'
globalLanguageValue = 'on'
value = 'on'
```

Example 3: Object Values

```ts
defaultValue = { "a": 1, "b": 2 };
globalValue = { "b": 3, "c": 4 };
value = { "a": 1, "b": 3, "c": 4 };
```

*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`:

```ts
// launch.json configuration
const config = workspace.getConfiguration('launch', vscode.workspace.workspaceFolders[0].uri);

// retrieve values
const values = config.get('configurations');
```

Refer to [Settings](https://code.visualstudio.com/docs/getstarted/settings) for more information.
raw docstring

getcljs

(get workspace-configuration section)
(get workspace-configuration section default-value)

Return a value from this configuration.

Parameters:

  • section: string - Configuration name, supports dotted names.
  • default-value: T - A value should be returned when no value could be found, is undefined.

Returns: T - The value section denotes or the default.

Return a value from this configuration.

**Parameters:**
- `section`: `string` - Configuration name, supports _dotted_ names.
- `default-value`: `T` - A value should be returned when no value could be found, is `undefined`.

**Returns:** `T` - The value `section` denotes or the default.
sourceraw docstring

has?cljs

(has? workspace-configuration section)

Check if this configuration has a certain value.

Parameters:

  • section: string - Configuration name, supports dotted names.

Returns: boolean - true if the section doesn't resolve to undefined.

Check if this configuration has a certain value.

**Parameters:**
- `section`: `string` - Configuration name, supports _dotted_ names.

**Returns:** `boolean` - `true` if the section doesn't resolve to `undefined`.
sourceraw docstring

inspectcljs

(inspect workspace-configuration section)

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, folder-specific value and language-specific values (if {@link WorkspaceConfiguration } is scoped to a language).

Also provides all language ids under which the given configuration setting is defined.

Note: The configuration name must denote a leaf in the configuration tree (editor.fontSize vs editor) otherwise no result is returned.

Parameters:

  • section: string - Configuration name, supports dotted names.

Returns: { key: string; defaultValue?: T | undefined; globalValue?: T | undefined; workspaceValue?: T | undefined; workspaceFolderValue?: T | undefined; defaultLanguageValue?: T | undefined; globalLanguageValue?: T | undefined; workspaceLanguageValue?: T | undefined; workspaceFolderLanguageValue?: T | undefined; languageIds?... - Information about a configuration setting or 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, folder-specific value
and language-specific values (if {@link WorkspaceConfiguration } is scoped to a language).

Also provides all language ids under which the given configuration setting is defined.

*Note:* The configuration name must denote a leaf in the configuration tree
(`editor.fontSize` vs `editor`) otherwise no result is returned.

**Parameters:**
- `section`: `string` - Configuration name, supports _dotted_ names.

**Returns:** `{ key: string; defaultValue?: T | undefined; globalValue?: T | undefined; workspaceValue?: T | undefined; workspaceFolderValue?: T | undefined; defaultLanguageValue?: T | undefined; globalLanguageValue?: T | undefined; workspaceLanguageValue?: T | undefined; workspaceFolderLanguageValue?: T | undefined; languageIds?...` - Information about a configuration setting or `undefined`.
sourceraw docstring

updatecljs

(update workspace-configuration section value)
(update workspace-configuration section value configuration-target?)
(update workspace-configuration
        section
        value
        configuration-target?
        override-in-language?)

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

A value can be changed in

  • {@link ConfigurationTarget.Global Global settings}: Changes the value for all instances of the editor.
  • {@link ConfigurationTarget.Workspace Workspace settings}: Changes the value for current workspace, if available.
  • {@link ConfigurationTarget.WorkspaceFolder 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:

  • section: string - Configuration name, supports dotted names.
  • value: any - The new value.
  • configuration-target?: boolean | ConfigurationTarget | null | undefined - The {@link ConfigurationTarget configuration target} or a boolean value.
  • If true updates {@link ConfigurationTarget.Global Global settings}.
  • If false updates {@link ConfigurationTarget.Workspace Workspace settings}.
  • If undefined or null updates to {@link ConfigurationTarget.WorkspaceFolder Workspace folder settings} if configuration is resource specific, otherwise to {@link ConfigurationTarget.Workspace Workspace settings}.
  • override-in-language?: boolean | undefined - 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.

Returns: Thenable<void>

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

A value can be changed in

- {@link ConfigurationTarget.Global Global settings}: Changes the value for all instances of the editor.
- {@link ConfigurationTarget.Workspace Workspace settings}: Changes the value for current workspace, if available.
- {@link ConfigurationTarget.WorkspaceFolder 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:**
- `section`: `string` - Configuration name, supports _dotted_ names.
- `value`: `any` - The new value.
- `configuration-target?`: `boolean | ConfigurationTarget | null | undefined` - The {@link ConfigurationTarget configuration target} or a boolean value.
- If `true` updates {@link ConfigurationTarget.Global Global settings}.
- If `false` updates {@link ConfigurationTarget.Workspace Workspace settings}.
- If `undefined` or `null` updates to {@link ConfigurationTarget.WorkspaceFolder Workspace folder settings} if configuration is resource specific,
otherwise to {@link ConfigurationTarget.Workspace Workspace settings}.
- `override-in-language?`: `boolean | undefined` - 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.

**Returns:** `Thenable<void>`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close