Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Configuration

Extension settings.

Hierarchy

  • WorkspaceConfiguration
    • Configuration

Indexable

[key: string]: any

Readable dictionary that backs this configuration.

Index

Properties

Optional globals

globals: any

Global options / data.

Optional hexWidth

hexWidth: number

The width for binary data in hex view.

Optional openAfterTrace

openAfterTrace: boolean

Default value that indicates if traces should be opened in new tab after trace has been finished or not.

Optional outputFormat

outputFormat: string

Default output format for traces.

Optional proxies

proxies: object

One or more proxy entries.

Type declaration

Optional writeToOutput

writeToOutput: boolean

Default value for writing trace entries to output or not.

Methods

get

  • get<T>(section: string): T | undefined
  • get<T>(section: string, defaultValue: T): T
  • Return a value from this configuration.

    Type parameters

    • T

    Parameters

    • section: string

      Configuration name, supports dotted names.

    Returns T | undefined

    The value section denotes or undefined.

  • Return a value from this configuration.

    Type parameters

    • T

    Parameters

    • section: string

      Configuration name, supports dotted names.

    • defaultValue: T

      A value should be returned when no value could be found, is undefined.

    Returns T

    The value section denotes or the default.

has

  • has(section: string): boolean
  • 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.

inspect

  • inspect<T>(section: string): object | undefined
  • Retrieve all information about a configuration setting. A configuration value often consists of a default value, a global or installation-wide value, and a workspace-specific value. The effective value (returned by get) is computed like this: defaultValue overwritten by globalValue, globalValue overwritten by workspaceValue.

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

    Type parameters

    • T

    Parameters

    • section: string

      Configuration name, supports dotted names.

    Returns object | undefined

    Information about a configuration setting or undefined.

update

  • update(section: string, value: any, global?: boolean): Thenable<void>
  • Update a configuration value. A value can be changed for the current workspace only, or globally for all instances of the editor. The updated configuration values are persisted.

    Note 1: Setting an installation-wide value (global: true) in the presence of a more specific workspace value has no observable effect in that workspace, but in others.

    Note 2: 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.

    • Optional global: boolean

      When true changes the configuration value for all instances of the editor.

    Returns Thenable<void>

Generated using TypeDoc