Namespace for dealing with the current window of the editor. That is visible and active editors, as well as, UI elements to show messages, selections, and asking for user input.
Namespace for dealing with the current window of the editor. That is visible and active editors, as well as, UI elements to show messages, selections, and asking for user input.
(active-color-theme)
The currently active color theme as configured in the settings. The active
theme can be changed via the workbench.colorTheme
setting.
The currently active color theme as configured in the settings. The active theme can be changed via the `workbench.colorTheme` setting.
(active-notebook-editor)
The currently active {@link NotebookEditor notebook editor} or undefined
. The active editor is the one
that currently has focus or, when none has focus, the one that has changed
input most recently.
The currently active {@link NotebookEditor notebook editor} or `undefined`. The active editor is the one that currently has focus or, when none has focus, the one that has changed input most recently.
(active-terminal)
The currently active terminal or undefined
. The active terminal is the one that
currently has focus or most recently had focus.
The currently active terminal or `undefined`. The active terminal is the one that currently has focus or most recently had focus.
(active-text-editor)
The currently active editor or undefined
. The active editor is the one
that currently has focus or, when none has focus, the one that has changed
input most recently.
The currently active editor or `undefined`. The active editor is the one that currently has focus or, when none has focus, the one that has changed input most recently.
(create-input-box)
Creates a {@link InputBox } to let the user enter some text input.
Note that in many cases the more convenient {@link window.showInputBox } is easier to use. {@link window.createInputBox } should be used when {@link window.showInputBox } does not offer the required flexibility.
Returns: InputBox
- A new {@link InputBox}.
Creates a {@link InputBox } to let the user enter some text input. Note that in many cases the more convenient {@link window.showInputBox } is easier to use. {@link window.createInputBox } should be used when {@link window.showInputBox } does not offer the required flexibility. **Returns:** `InputBox` - A new {@link InputBox}.
(create-output-channel name)
(create-output-channel name language-id)
(create-output-channel name options)
Creates a new {@link OutputChannel output channel} with the given name and language id If language id is not provided, then Log is used as default language id.
You can access the visible or active output channel as a {@link TextDocument text document} from {@link window.visibleTextEditors visible editors} or {@link window.activeTextEditor active editor} and use the language id to contribute language features like syntax coloring, code lens etc., Creates a new {@link LogOutputChannel log output channel} with the given name.
Parameters:
name
: string
- Human-readable string which will be used to represent the channel in the UI.language-id
: string | undefined
- The identifier of the language associated with the channel.options
: { log: true; }
- Options for the log output channel.Returns: LogOutputChannel
- A new log output channel.
Creates a new {@link OutputChannel output channel} with the given name and language id If language id is not provided, then **Log** is used as default language id. You can access the visible or active output channel as a {@link TextDocument text document} from {@link window.visibleTextEditors visible editors} or {@link window.activeTextEditor active editor} and use the language id to contribute language features like syntax coloring, code lens etc., Creates a new {@link LogOutputChannel log output channel} with the given name. **Parameters:** - `name`: `string` - Human-readable string which will be used to represent the channel in the UI. - `language-id`: `string | undefined` - The identifier of the language associated with the channel. - `options`: `{ log: true; }` - Options for the log output channel. **Returns:** `LogOutputChannel` - A new log output channel.
(create-quick-pick)
Creates a {@link QuickPick } to let the user pick an item from a list of items of type T.
Note that in many cases the more convenient {@link window.showQuickPick } is easier to use. {@link window.createQuickPick } should be used when {@link window.showQuickPick } does not offer the required flexibility.
Returns: QuickPick<T>
- A new {@link QuickPick}.
Creates a {@link QuickPick } to let the user pick an item from a list of items of type T. Note that in many cases the more convenient {@link window.showQuickPick } is easier to use. {@link window.createQuickPick } should be used when {@link window.showQuickPick } does not offer the required flexibility. **Returns:** `QuickPick<T>` - A new {@link QuickPick}.
(create-status-bar-item)
(create-status-bar-item alignment)
(create-status-bar-item id)
(create-status-bar-item alignment priority)
(create-status-bar-item id alignment)
(create-status-bar-item id alignment priority)
Creates a status bar {@link StatusBarItem item}.
Parameters:
alignment
: StatusBarAlignment | undefined
- The alignment of the item.id
: string
- The identifier of the item. Must be unique within the extension.priority
: number | undefined
- The priority of the item. Higher values mean the item should be shown more to the left.Returns: StatusBarItem
- A new status bar item.
Creates a status bar {@link StatusBarItem item}. **Parameters:** - `alignment`: `StatusBarAlignment | undefined` - The alignment of the item. - `id`: `string` - The identifier of the item. Must be unique within the extension. - `priority`: `number | undefined` - The priority of the item. Higher values mean the item should be shown more to the left. **Returns:** `StatusBarItem` - A new status bar item.
(create-terminal)
(create-terminal name)
(create-terminal options)
(create-terminal name shell-path)
(create-terminal name shell-path shell-args)
Creates a {@link Terminal } with a backing shell process. The cwd of the terminal will be the workspace directory if it exists. Creates a {@link Terminal } with a backing shell process. Creates a {@link Terminal } where an extension controls its input and output.
Parameters:
name
: string | undefined
- Optional human-readable string which will be used to represent the terminal in the UI.options
: ExtensionTerminalOptions
- An {@link ExtensionTerminalOptions } object describing
the characteristics of the new terminal.shell-path
: string | undefined
- Optional path to a custom shell executable to be used in the terminal.shell-args
: string | readonly string[] | undefined
- Optional args for the custom shell executable. A string can be used on Windows only which
allows specifying shell args in
command-line format.Returns: Terminal
- A new Terminal.
Creates a {@link Terminal } with a backing shell process. The cwd of the terminal will be the workspace directory if it exists. Creates a {@link Terminal } with a backing shell process. Creates a {@link Terminal } where an extension controls its input and output. **Parameters:** - `name`: `string | undefined` - Optional human-readable string which will be used to represent the terminal in the UI. - `options`: `ExtensionTerminalOptions` - An {@link ExtensionTerminalOptions } object describing the characteristics of the new terminal. - `shell-path`: `string | undefined` - Optional path to a custom shell executable to be used in the terminal. - `shell-args`: `string | readonly string[] | undefined` - Optional args for the custom shell executable. A string can be used on Windows only which allows specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6). **Returns:** `Terminal` - A new Terminal.
(create-text-editor-decoration-type options)
Create a TextEditorDecorationType that can be used to add decorations to text editors.
Parameters:
options
: DecorationRenderOptions
- Rendering options for the decoration type.Returns: TextEditorDecorationType
- A new decoration type instance.
Create a TextEditorDecorationType that can be used to add decorations to text editors. **Parameters:** - `options`: `DecorationRenderOptions` - Rendering options for the decoration type. **Returns:** `TextEditorDecorationType` - A new decoration type instance.
(create-tree-view view-id options)
Create a {@link TreeView } for the view contributed using the extension point views
.
Parameters:
view-id
: string
- Id of the view contributed using the extension point views
.options
: TreeViewOptions<T>
- Options for creating the {@link TreeView }Returns: TreeView<T>
- a {@link TreeView}.
Create a {@link TreeView } for the view contributed using the extension point `views`. **Parameters:** - `view-id`: `string` - Id of the view contributed using the extension point `views`. - `options`: `TreeViewOptions<T>` - Options for creating the {@link TreeView } **Returns:** `TreeView<T>` - a {@link TreeView}.
(create-webview-panel view-type title show-options)
(create-webview-panel view-type title show-options options)
Create and show a new webview panel.
Parameters:
view-type
: string
- Identifies the type of the webview panel.title
: string
- Title of the panel.show-options
: ViewColumn | { readonly viewColumn: ViewColumn; readonly preserveFocus?: boolean | undefined; }
- Where to show the webview in the editor. If preserveFocus is set, the new webview will not take focus.options
: (WebviewPanelOptions & WebviewOptions) | undefined
- Settings for the new panel.Returns: WebviewPanel
- New webview panel.
Create and show a new webview panel. **Parameters:** - `view-type`: `string` - Identifies the type of the webview panel. - `title`: `string` - Title of the panel. - `show-options`: `ViewColumn | { readonly viewColumn: ViewColumn; readonly preserveFocus?: boolean | undefined; }` - Where to show the webview in the editor. If preserveFocus is set, the new webview will not take focus. - `options`: `(WebviewPanelOptions & WebviewOptions) | undefined` - Settings for the new panel. **Returns:** `WebviewPanel` - New webview panel.
(on-did-change-active-color-theme)
(on-did-change-active-color-theme listener)
(on-did-change-active-color-theme listener this-args)
(on-did-change-active-color-theme listener this-args disposables)
An {@link Event } which fires when the active color theme is changed or has changes.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the active color theme is changed or has changes. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-active-notebook-editor)
(on-did-change-active-notebook-editor listener)
(on-did-change-active-notebook-editor listener this-args)
(on-did-change-active-notebook-editor listener this-args disposables)
An {@link Event } which fires when the {@link window.activeNotebookEditor active notebook editor}
has changed. Note that the event also fires when the active editor changes
to undefined
.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the {@link window.activeNotebookEditor active notebook editor} has changed. *Note* that the event also fires when the active editor changes to `undefined`. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-active-terminal)
(on-did-change-active-terminal listener)
(on-did-change-active-terminal listener this-args)
(on-did-change-active-terminal listener this-args disposables)
An {@link Event } which fires when the {@link window.activeTerminal active terminal}
has changed. Note that the event also fires when the active terminal changes
to undefined
.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the {@link window.activeTerminal active terminal} has changed. *Note* that the event also fires when the active terminal changes to `undefined`. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-active-text-editor)
(on-did-change-active-text-editor listener)
(on-did-change-active-text-editor listener this-args)
(on-did-change-active-text-editor listener this-args disposables)
An {@link Event } which fires when the {@link window.activeTextEditor active editor}
has changed. Note that the event also fires when the active editor changes
to undefined
.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the {@link window.activeTextEditor active editor} has changed. *Note* that the event also fires when the active editor changes to `undefined`. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-notebook-editor-selection)
(on-did-change-notebook-editor-selection listener)
(on-did-change-notebook-editor-selection listener this-args)
(on-did-change-notebook-editor-selection listener this-args disposables)
An {@link Event } which fires when the {@link NotebookEditor.selections notebook editor selections} have changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the {@link NotebookEditor.selections notebook editor selections} have changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-notebook-editor-visible-ranges)
(on-did-change-notebook-editor-visible-ranges listener)
(on-did-change-notebook-editor-visible-ranges listener this-args)
(on-did-change-notebook-editor-visible-ranges listener this-args disposables)
An {@link Event } which fires when the {@link NotebookEditor.visibleRanges notebook editor visible ranges} have changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the {@link NotebookEditor.visibleRanges notebook editor visible ranges} have changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-terminal-state)
(on-did-change-terminal-state listener)
(on-did-change-terminal-state listener this-args)
(on-did-change-terminal-state listener this-args disposables)
An {@link Event } which fires when a {@link Terminal.state terminal's state} has changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when a {@link Terminal.state terminal's state} has changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-text-editor-options)
(on-did-change-text-editor-options listener)
(on-did-change-text-editor-options listener this-args)
(on-did-change-text-editor-options listener this-args disposables)
An {@link Event } which fires when the options of an editor have changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the options of an editor have changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-text-editor-selection)
(on-did-change-text-editor-selection listener)
(on-did-change-text-editor-selection listener this-args)
(on-did-change-text-editor-selection listener this-args disposables)
An {@link Event } which fires when the selection in an editor has changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the selection in an editor has changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-text-editor-view-column)
(on-did-change-text-editor-view-column listener)
(on-did-change-text-editor-view-column listener this-args)
(on-did-change-text-editor-view-column listener this-args disposables)
An {@link Event } which fires when the view column of an editor has changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the view column of an editor has changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-text-editor-visible-ranges)
(on-did-change-text-editor-visible-ranges listener)
(on-did-change-text-editor-visible-ranges listener this-args)
(on-did-change-text-editor-visible-ranges listener this-args disposables)
An {@link Event } which fires when the visible ranges of an editor has changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the visible ranges of an editor has changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-visible-notebook-editors)
(on-did-change-visible-notebook-editors listener)
(on-did-change-visible-notebook-editors listener this-args)
(on-did-change-visible-notebook-editors listener this-args disposables)
An {@link Event } which fires when the {@link window.visibleNotebookEditors visible notebook editors} has changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the {@link window.visibleNotebookEditors visible notebook editors} has changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-visible-text-editors)
(on-did-change-visible-text-editors listener)
(on-did-change-visible-text-editors listener this-args)
(on-did-change-visible-text-editors listener this-args disposables)
An {@link Event } which fires when the array of {@link window.visibleTextEditors visible editors} has changed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the array of {@link window.visibleTextEditors visible editors} has changed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-change-window-state)
(on-did-change-window-state listener)
(on-did-change-window-state listener this-args)
(on-did-change-window-state listener this-args disposables)
An {@link Event } which fires when the focus or activity state of the current window changes. The value of the event represents whether the window is focused.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when the focus or activity state of the current window changes. The value of the event represents whether the window is focused. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-close-terminal)
(on-did-close-terminal listener)
(on-did-close-terminal listener this-args)
(on-did-close-terminal listener this-args disposables)
An {@link Event } which fires when a terminal is disposed.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when a terminal is disposed. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(on-did-open-terminal)
(on-did-open-terminal listener)
(on-did-open-terminal listener this-args)
(on-did-open-terminal listener this-args disposables)
An {@link Event } which fires when a terminal has been created, either through the {@link window.createTerminal createTerminal} API or commands.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires when a terminal has been created, either through the {@link window.createTerminal createTerminal} API or commands. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(register-custom-editor-provider view-type provider)
(register-custom-editor-provider view-type provider options)
Register a provider for custom editors for the viewType
contributed by the customEditors
extension point.
When a custom editor is opened, an onCustomEditor:viewType
activation event is fired. Your extension
must register a {@linkcode CustomTextEditorProvider }, {@linkcode CustomReadonlyEditorProvider },
{@linkcode CustomEditorProvider }for viewType
as part of activation.
Parameters:
view-type
: string
- Unique identifier for the custom editor provider. This should match the viewType
from the
customEditors
contribution point.provider
: CustomTextEditorProvider | CustomReadonlyEditorProvider<CustomDocument> | CustomEditorProvider<CustomDocument>
- Provider that resolves custom editors.options
: { readonly webviewOptions?: WebviewPanelOptions | undefined; readonly supportsMultipleEditorsPerDocument?: boolean | undefined; } | undefined
- Options for the provider.Returns: Disposable
- Disposable that unregisters the provider.
Register a provider for custom editors for the `viewType` contributed by the `customEditors` extension point. When a custom editor is opened, an `onCustomEditor:viewType` activation event is fired. Your extension must register a {@linkcode CustomTextEditorProvider }, {@linkcode CustomReadonlyEditorProvider }, {@linkcode CustomEditorProvider }for `viewType` as part of activation. **Parameters:** - `view-type`: `string` - Unique identifier for the custom editor provider. This should match the `viewType` from the `customEditors` contribution point. - `provider`: `CustomTextEditorProvider | CustomReadonlyEditorProvider<CustomDocument> | CustomEditorProvider<CustomDocument>` - Provider that resolves custom editors. - `options`: `{ readonly webviewOptions?: WebviewPanelOptions | undefined; readonly supportsMultipleEditorsPerDocument?: boolean | undefined; } | undefined` - Options for the provider. **Returns:** `Disposable` - Disposable that unregisters the provider.
(register-file-decoration-provider provider)
Register a file decoration provider.
Parameters:
provider
: FileDecorationProvider
- A {@link FileDecorationProvider }.Returns: Disposable
- A {@link Disposable} that unregisters the provider.
Register a file decoration provider. **Parameters:** - `provider`: `FileDecorationProvider` - A {@link FileDecorationProvider }. **Returns:** `Disposable` - A {@link Disposable} that unregisters the provider.
(register-terminal-link-provider provider)
Register provider that enables the detection and handling of links within the terminal.
Parameters:
provider
: TerminalLinkProvider<TerminalLink>
- The provider that provides the terminal links.Returns: Disposable
- Disposable that unregisters the provider.
Register provider that enables the detection and handling of links within the terminal. **Parameters:** - `provider`: `TerminalLinkProvider<TerminalLink>` - The provider that provides the terminal links. **Returns:** `Disposable` - Disposable that unregisters the provider.
(register-terminal-profile-provider id provider)
Registers a provider for a contributed terminal profile.
Parameters:
id
: string
- The ID of the contributed terminal profile.provider
: TerminalProfileProvider
- The terminal profile provider.Returns: Disposable
- A {@link Disposabledisposable} that unregisters the provider.
Registers a provider for a contributed terminal profile. **Parameters:** - `id`: `string` - The ID of the contributed terminal profile. - `provider`: `TerminalProfileProvider` - The terminal profile provider. **Returns:** `Disposable` - A {@link Disposabledisposable} that unregisters the provider.
(register-tree-data-provider view-id tree-data-provider)
Register a {@link TreeDataProvider } for the view contributed using the extension point views
.
This will allow you to contribute data to the {@link TreeView } and update if the data changes.
Note: To get access to the {@link TreeView } and perform operations on it, use {@link window.createTreeView createTreeView}.
Parameters:
view-id
: string
- Id of the view contributed using the extension point views
.tree-data-provider
: TreeDataProvider<T>
- A {@link TreeDataProvider } that provides tree data for the viewReturns: Disposable
- A {@link Disposabledisposable} that unregisters the {@link TreeDataProvider}.
Register a {@link TreeDataProvider } for the view contributed using the extension point `views`. This will allow you to contribute data to the {@link TreeView } and update if the data changes. **Note:** To get access to the {@link TreeView } and perform operations on it, use {@link window.createTreeView createTreeView}. **Parameters:** - `view-id`: `string` - Id of the view contributed using the extension point `views`. - `tree-data-provider`: `TreeDataProvider<T>` - A {@link TreeDataProvider } that provides tree data for the view **Returns:** `Disposable` - A {@link Disposabledisposable} that unregisters the {@link TreeDataProvider}.
(register-uri-handler handler)
Registers a {@link UriHandler uri handler} capable of handling system-wide {@link Uri uris}. In case there are multiple windows open, the topmost window will handle the uri. A uri handler is scoped to the extension it is contributed from; it will only be able to handle uris which are directed to the extension itself. A uri must respect the following rules:
vscode.env.uriScheme
;my.extension
);For example, if the my.extension
extension registers a uri handler, it will only
be allowed to handle uris with the prefix product-name://my.extension
.
An extension can only register a single uri handler in its entire activation lifetime.
onUri
that fires when a uri directed for
the current extension is about to be handled.Parameters:
handler
: UriHandler
- The uri handler to register for this extension.Returns: Disposable
- A {@link Disposabledisposable} that unregisters the handler.
Registers a {@link UriHandler uri handler} capable of handling system-wide {@link Uri uris}. In case there are multiple windows open, the topmost window will handle the uri. A uri handler is scoped to the extension it is contributed from; it will only be able to handle uris which are directed to the extension itself. A uri must respect the following rules: - The uri-scheme must be `vscode.env.uriScheme`; - The uri-authority must be the extension id (e.g. `my.extension`); - The uri-path, -query and -fragment parts are arbitrary. For example, if the `my.extension` extension registers a uri handler, it will only be allowed to handle uris with the prefix `product-name://my.extension`. An extension can only register a single uri handler in its entire activation lifetime. * *Note:* There is an activation event `onUri` that fires when a uri directed for the current extension is about to be handled. **Parameters:** - `handler`: `UriHandler` - The uri handler to register for this extension. **Returns:** `Disposable` - A {@link Disposabledisposable} that unregisters the handler.
(register-webview-panel-serializer view-type serializer)
Registers a webview panel serializer.
Extensions that support reviving should have an "onWebviewPanel:viewType"
activation event and
make sure that registerWebviewPanelSerializer
is called during activation.
Only a single serializer may be registered at a time for a given viewType
.
Parameters:
view-type
: string
- Type of the webview panel that can be serialized.serializer
: WebviewPanelSerializer<unknown>
- Webview serializer.Returns: Disposable
- A {@link Disposabledisposable} that unregisters the serializer.
Registers a webview panel serializer. Extensions that support reviving should have an `"onWebviewPanel:viewType"` activation event and make sure that `registerWebviewPanelSerializer` is called during activation. Only a single serializer may be registered at a time for a given `viewType`. **Parameters:** - `view-type`: `string` - Type of the webview panel that can be serialized. - `serializer`: `WebviewPanelSerializer<unknown>` - Webview serializer. **Returns:** `Disposable` - A {@link Disposabledisposable} that unregisters the serializer.
(register-webview-view-provider view-id provider)
(register-webview-view-provider view-id provider options)
Register a new provider for webview views.
Parameters:
view-id
: string
- Unique id of the view. This should match the id
from the
views
contribution in the package.json.provider
: WebviewViewProvider
- Provider for the webview views.options
: { readonly webviewOptions?: { readonly retainContextWhenHidden?: boolean | undefined; } | undefined; } | undefined
Returns: Disposable
- Disposable that unregisters the provider.
Register a new provider for webview views. **Parameters:** - `view-id`: `string` - Unique id of the view. This should match the `id` from the `views` contribution in the package.json. - `provider`: `WebviewViewProvider` - Provider for the webview views. - `options`: `{ readonly webviewOptions?: { readonly retainContextWhenHidden?: boolean | undefined; } | undefined; } | undefined` **Returns:** `Disposable` - Disposable that unregisters the provider.
(set-status-bar-message text)
(set-status-bar-message text hide-after-timeout)
(set-status-bar-message text hide-when-done)
Set a message to the status bar. This is a short hand for the more powerful status bar {@link window.createStatusBarItem items}. Set a message to the status bar. This is a short hand for the more powerful status bar {@link window.createStatusBarItem items}.
Note that status bar messages stack and that they must be disposed when no longer used.
Parameters:
text
: string
- The message to show, supports icon substitution as in status bar {@link StatusBarItem.text items}.hide-after-timeout
: number
- Timeout in milliseconds after which the message will be disposed.hide-when-done
: Thenable<any>
- Thenable on which completion (resolve or reject) the message will be disposed.Returns: Disposable
- A disposable which hides the status bar message.
Set a message to the status bar. This is a short hand for the more powerful status bar {@link window.createStatusBarItem items}. Set a message to the status bar. This is a short hand for the more powerful status bar {@link window.createStatusBarItem items}. *Note* that status bar messages stack and that they must be disposed when no longer used. **Parameters:** - `text`: `string` - The message to show, supports icon substitution as in status bar {@link StatusBarItem.text items}. - `hide-after-timeout`: `number` - Timeout in milliseconds after which the message will be disposed. - `hide-when-done`: `Thenable<any>` - Thenable on which completion (resolve or reject) the message will be disposed. **Returns:** `Disposable` - A disposable which hides the status bar message.
(show-error-message message & items)
(show-error-message message options & items)
Show an error message.
Parameters:
message
: string
- The message to show.options
: MessageOptions
- Configures the behaviour of the message.items
: T[]
- A set of items that will be rendered as actions in the message.Returns: Thenable<T | undefined>
- A thenable that resolves to the selected item or undefined
when being dismissed.
Show an error message. **Parameters:** - `message`: `string` - The message to show. - `options`: `MessageOptions` - Configures the behaviour of the message. - `items`: `T[]` - A set of items that will be rendered as actions in the message. **Returns:** `Thenable<T | undefined>` - A thenable that resolves to the selected item or `undefined` when being dismissed.
(show-information-message message & items)
(show-information-message message options & items)
Show an information message to users. Optionally provide an array of items which will be presented as clickable buttons. Show an information message.
Parameters:
message
: string
- The message to show.options
: MessageOptions
- Configures the behaviour of the message.items
: T[]
- A set of items that will be rendered as actions in the message.Returns: Thenable<T | undefined>
- A thenable that resolves to the selected item or undefined
when being dismissed.
Show an information message to users. Optionally provide an array of items which will be presented as clickable buttons. Show an information message. **Parameters:** - `message`: `string` - The message to show. - `options`: `MessageOptions` - Configures the behaviour of the message. - `items`: `T[]` - A set of items that will be rendered as actions in the message. **Returns:** `Thenable<T | undefined>` - A thenable that resolves to the selected item or `undefined` when being dismissed.
(show-input-box)
(show-input-box options)
(show-input-box options token)
Opens an input box to ask the user for input.
The returned value will be undefined
if the input box was canceled (e.g. pressing ESC). Otherwise the
returned value will be the string typed by the user or an empty string if the user did not type
anything but dismissed the input box with OK.
Parameters:
options
: InputBoxOptions | undefined
- Configures the behavior of the input box.token
: CancellationToken | undefined
- A token that can be used to signal cancellation.Returns: Thenable<string | undefined>
- A promise that resolves to a string the user provided or to undefined
in case of dismissal.
Opens an input box to ask the user for input. The returned value will be `undefined` if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK. **Parameters:** - `options`: `InputBoxOptions | undefined` - Configures the behavior of the input box. - `token`: `CancellationToken | undefined` - A token that can be used to signal cancellation. **Returns:** `Thenable<string | undefined>` - A promise that resolves to a string the user provided or to `undefined` in case of dismissal.
(show-notebook-document document)
(show-notebook-document document options)
Show the given {@link NotebookDocument } in a {@link NotebookEditor notebook editor}.
Parameters:
document
: NotebookDocument
- A text document to be shown.options
: NotebookDocumentShowOptions | undefined
- {@link NotebookDocumentShowOptions Editor options} to configure the behavior of showing the {@link NotebookEditor notebook editor}.Returns: Thenable<NotebookEditor>
- A promise that resolves to an {@link NotebookEditornotebook editor}.
Show the given {@link NotebookDocument } in a {@link NotebookEditor notebook editor}. **Parameters:** - `document`: `NotebookDocument` - A text document to be shown. - `options`: `NotebookDocumentShowOptions | undefined` - {@link NotebookDocumentShowOptions Editor options} to configure the behavior of showing the {@link NotebookEditor notebook editor}. **Returns:** `Thenable<NotebookEditor>` - A promise that resolves to an {@link NotebookEditornotebook editor}.
(show-open-dialog)
(show-open-dialog options)
Shows a file open dialog to the user which allows to select a file for opening-purposes.
Parameters:
options
: OpenDialogOptions | undefined
- Options that control the dialog.Returns: Thenable<Uri[] | undefined>
- A promise that resolves to the selected resources or undefined
.
Shows a file open dialog to the user which allows to select a file for opening-purposes. **Parameters:** - `options`: `OpenDialogOptions | undefined` - Options that control the dialog. **Returns:** `Thenable<Uri[] | undefined>` - A promise that resolves to the selected resources or `undefined`.
(show-quick-pick items)
(show-quick-pick items options)
(show-quick-pick items options token)
Shows a selection list allowing multiple selections. Shows a selection list.
Parameters:
items
: readonly T[] | Thenable<readonly T[]>
- An array of items, or a promise that resolves to an array of items.options
: QuickPickOptions | undefined
- Configures the behavior of the selection list.token
: CancellationToken | undefined
- A token that can be used to signal cancellation.Returns: Thenable<T | undefined>
- A promise that resolves to the selected item or undefined
.
Shows a selection list allowing multiple selections. Shows a selection list. **Parameters:** - `items`: `readonly T[] | Thenable<readonly T[]>` - An array of items, or a promise that resolves to an array of items. - `options`: `QuickPickOptions | undefined` - Configures the behavior of the selection list. - `token`: `CancellationToken | undefined` - A token that can be used to signal cancellation. **Returns:** `Thenable<T | undefined>` - A promise that resolves to the selected item or `undefined`.
(show-save-dialog)
(show-save-dialog options)
Shows a file save dialog to the user which allows to select a file for saving-purposes.
Parameters:
options
: SaveDialogOptions | undefined
- Options that control the dialog.Returns: Thenable<Uri | undefined>
- A promise that resolves to the selected resource or undefined
.
Shows a file save dialog to the user which allows to select a file for saving-purposes. **Parameters:** - `options`: `SaveDialogOptions | undefined` - Options that control the dialog. **Returns:** `Thenable<Uri | undefined>` - A promise that resolves to the selected resource or `undefined`.
(show-text-document document)
(show-text-document uri)
(show-text-document document column)
(show-text-document document options)
(show-text-document uri options)
(show-text-document document column preserve-focus?)
Show the given document in a text editor. A {@link ViewColumn column} can be provided
to control where the editor is being shown. Might change the {@link window.activeTextEditor active editor}.
Show the given document in a text editor. {@link TextDocumentShowOptions Options} can be provided
to control options of the editor is being shown. Might change the {@link window.activeTextEditor active editor}.
A short-hand for openTextDocument(uri).then(document => showTextDocument(document, options))
.
Parameters:
document
: TextDocument
- A text document to be shown.uri
: Uri
- A resource identifier.column
: ViewColumn | undefined
- A view column in which the {@link TextEditor editor} should be shown. The default is the {@link ViewColumn.Active active}.
Columns that do not exist will be created as needed up to the maximum of {@linkcode ViewColumn.Nine }. Use {@linkcode ViewColumn.Beside }to open the editor to the side of the currently active one.options
: TextDocumentShowOptions | undefined
- {@link TextDocumentShowOptions Editor options} to configure the behavior of showing the {@link TextEditor editor}.preserve-focus?
: boolean | undefined
- When true
the editor will not take focus.Returns: Thenable<TextEditor>
- A promise that resolves to an {@link TextEditoreditor}.
Show the given document in a text editor. A {@link ViewColumn column} can be provided to control where the editor is being shown. Might change the {@link window.activeTextEditor active editor}. Show the given document in a text editor. {@link TextDocumentShowOptions Options} can be provided to control options of the editor is being shown. Might change the {@link window.activeTextEditor active editor}. A short-hand for `openTextDocument(uri).then(document => showTextDocument(document, options))`. **Parameters:** - `document`: `TextDocument` - A text document to be shown. - `uri`: `Uri` - A resource identifier. - `column`: `ViewColumn | undefined` - A view column in which the {@link TextEditor editor} should be shown. The default is the {@link ViewColumn.Active active}. Columns that do not exist will be created as needed up to the maximum of {@linkcode ViewColumn.Nine }. Use {@linkcode ViewColumn.Beside }to open the editor to the side of the currently active one. - `options`: `TextDocumentShowOptions | undefined` - {@link TextDocumentShowOptions Editor options} to configure the behavior of showing the {@link TextEditor editor}. - `preserve-focus?`: `boolean | undefined` - When `true` the editor will not take focus. **Returns:** `Thenable<TextEditor>` - A promise that resolves to an {@link TextEditoreditor}.
(show-warning-message message & items)
(show-warning-message message options & items)
Show a warning message.
Parameters:
message
: string
- The message to show.options
: MessageOptions
- Configures the behaviour of the message.items
: T[]
- A set of items that will be rendered as actions in the message.Returns: Thenable<T | undefined>
- A thenable that resolves to the selected item or undefined
when being dismissed.
Show a warning message. **Parameters:** - `message`: `string` - The message to show. - `options`: `MessageOptions` - Configures the behaviour of the message. - `items`: `T[]` - A set of items that will be rendered as actions in the message. **Returns:** `Thenable<T | undefined>` - A thenable that resolves to the selected item or `undefined` when being dismissed.
(show-workspace-folder-pick)
(show-workspace-folder-pick options)
Shows a selection list of {@link workspace.workspaceFolders workspace folders} to pick from.
Returns undefined
if no folder is open.
Parameters:
options
: WorkspaceFolderPickOptions | undefined
- Configures the behavior of the workspace folder list.Returns: Thenable<WorkspaceFolder | undefined>
- A promise that resolves to the workspace folder or undefined
.
Shows a selection list of {@link workspace.workspaceFolders workspace folders} to pick from. Returns `undefined` if no folder is open. **Parameters:** - `options`: `WorkspaceFolderPickOptions | undefined` - Configures the behavior of the workspace folder list. **Returns:** `Thenable<WorkspaceFolder | undefined>` - A promise that resolves to the workspace folder or `undefined`.
(state)
Represents the current window's state.
Represents the current window's state.
(tab-groups)
Represents the grid widget within the main editor area
Represents the grid widget within the main editor area
(terminals)
The currently opened terminals or an empty array.
The currently opened terminals or an empty array.
(visible-notebook-editors)
The currently visible {@link NotebookEditor notebook editors} or an empty array.
The currently visible {@link NotebookEditor notebook editors} or an empty array.
(visible-text-editors)
The currently visible editors or an empty array.
The currently visible editors or an empty array.
(with-progress options task)
Show progress in the editor. Progress is shown while running the given callback and while the promise it returned isn't resolved nor rejected. The location at which progress should show (and other details) is defined via the passed {@linkcode ProgressOptions }.
Parameters:
options
: ProgressOptions
- A {@linkcode ProgressOptions }-object describing the options to use for showing progress, like its locationtask
: (progress: Progress<{ message?: string | undefined; increment?: number | undefined; }>, token: CancellationToken) => Thenable<R>
- A callback returning a promise. Progress state can be reported with
the provided {@link Progress }-object.To report discrete progress, use increment
to indicate how much work has been completed. Each call with
a increment
value will be summed up and reflected as overall progress until 100% is reached (a value of
e.g. 10
accounts for 10%
of work done).
Note that currently only ProgressLocation.Notification
is capable of showing discrete progress.
To monitor if the operation has been cancelled by the user, use the provided {@linkcode CancellationToken }.
Note that currently only ProgressLocation.Notification
is supporting to show a cancel button to cancel the
long running operation.
Returns: Thenable<R>
- The thenable the task-callback returned.
Show progress in the editor. Progress is shown while running the given callback and while the promise it returned isn't resolved nor rejected. The location at which progress should show (and other details) is defined via the passed {@linkcode ProgressOptions }. **Parameters:** - `options`: `ProgressOptions` - A {@linkcode ProgressOptions }-object describing the options to use for showing progress, like its location - `task`: `(progress: Progress<{ message?: string | undefined; increment?: number | undefined; }>, token: CancellationToken) => Thenable<R>` - A callback returning a promise. Progress state can be reported with the provided {@link Progress }-object. To report discrete progress, use `increment` to indicate how much work has been completed. Each call with a `increment` value will be summed up and reflected as overall progress until 100% is reached (a value of e.g. `10` accounts for `10%` of work done). Note that currently only `ProgressLocation.Notification` is capable of showing discrete progress. To monitor if the operation has been cancelled by the user, use the provided {@linkcode CancellationToken }. Note that currently only `ProgressLocation.Notification` is supporting to show a cancel button to cancel the long running operation. **Returns:** `Thenable<R>` - The thenable the task-callback returned.
(with-scm-progress task)
Show progress in the Source Control viewlet while running the given callback and while its returned promise isn't resolve or rejected.
Parameters:
task
: (progress: Progress<number>) => Thenable<R>
- A callback returning a promise. Progress increments can be reported with
the provided {@link Progress }-object.Returns: Thenable<R>
- The thenable the task did return.
Show progress in the Source Control viewlet while running the given callback and while its returned promise isn't resolve or rejected. **Parameters:** - `task`: `(progress: Progress<number>) => Thenable<R>` - A callback returning a promise. Progress increments can be reported with the provided {@link Progress }-object. **Returns:** `Thenable<R>` - The thenable the task did return.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close