Liking cljdoc? Tell your friends :D

dots.vscode.window.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.
raw docstring

documentcljs

(document)

The document associated with this text editor. The document will be the same for the entire lifetime of this text editor.

The document associated with this text editor. The document will be the same for the entire lifetime of this text editor.
sourceraw docstring

editcljs

(edit callback)
(edit callback options)

Perform an edit on the document associated with this text editor.

The given callback-function is invoked with an {@link TextEditorEdit edit-builder} which must be used to make edits. Note that the edit-builder is only valid while the callback executes.

Parameters:

  • callback: (editBuilder: TextEditorEdit) => void - A function which can create edits using an {@link TextEditorEdit edit-builder}.
  • options: { readonly undoStopBefore: boolean; readonly undoStopAfter: boolean; } | undefined - The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.

Returns: Thenable<boolean> - A promise that resolves with a value indicating if the edits could be applied.

Perform an edit on the document associated with this text editor.

The given callback-function is invoked with an {@link TextEditorEdit edit-builder} which must
be used to make edits. Note that the edit-builder is only valid while the
callback executes.

**Parameters:**
- `callback`: `(editBuilder: TextEditorEdit) => void` - A function which can create edits using an {@link TextEditorEdit edit-builder}.
- `options`: `{ readonly undoStopBefore: boolean; readonly undoStopAfter: boolean; } | undefined` - The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.

**Returns:** `Thenable<boolean>` - A promise that resolves with a value indicating if the edits could be applied.
sourceraw docstring

hidecljs

(hide)

Hide the text editor.

Returns: void

Hide the text editor.

**Returns:** `void`
sourceraw docstring

insert-snippetcljs

(insert-snippet snippet)
(insert-snippet snippet location)
(insert-snippet snippet location options)

Insert a {@link SnippetString snippet} and put the editor into snippet mode. "Snippet mode" means the editor adds placeholders and additional cursors so that the user can complete or accept the snippet.

Parameters:

  • snippet: SnippetString - The snippet to insert in this edit.
  • location: Range | Position | readonly Range[] | readonly Position[] | undefined - Position or range at which to insert the snippet, defaults to the current editor selection or selections.
  • options: { readonly undoStopBefore: boolean; readonly undoStopAfter: boolean; } | undefined - The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.

Returns: Thenable<boolean> - A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal that the snippet is completely filled-in or accepted.

Insert a {@link SnippetString snippet} and put the editor into snippet mode. "Snippet mode"
means the editor adds placeholders and additional cursors so that the user can complete
or accept the snippet.

**Parameters:**
- `snippet`: `SnippetString` - The snippet to insert in this edit.
- `location`: `Range | Position | readonly Range[] | readonly Position[] | undefined` - Position or range at which to insert the snippet, defaults to the current editor selection or selections.
- `options`: `{ readonly undoStopBefore: boolean; readonly undoStopAfter: boolean; } | undefined` - The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit.

**Returns:** `Thenable<boolean>` - A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal
that the snippet is completely filled-in or accepted.
sourceraw docstring

optionscljs

(options)

Text editor options.

Text editor options.
sourceraw docstring

reveal-rangecljs

(reveal-range range)
(reveal-range range reveal-type)

Scroll as indicated by revealType in order to reveal the given range.

Parameters:

  • range: Range - A range.
  • reveal-type: TextEditorRevealType | undefined - The scrolling strategy for revealing range.

Returns: void

Scroll as indicated by `revealType` in order to reveal the given range.

**Parameters:**
- `range`: `Range` - A range.
- `reveal-type`: `TextEditorRevealType | undefined` - The scrolling strategy for revealing `range`.

**Returns:** `void`
sourceraw docstring

selectioncljs

(selection)

The primary selection on this text editor. Shorthand for TextEditor.selections[0].

The primary selection on this text editor. Shorthand for `TextEditor.selections[0]`.
sourceraw docstring

selectionscljs

(selections)

The selections in this text editor. The primary selection is always at index 0.

The selections in this text editor. The primary selection is always at index 0.
sourceraw docstring

set-decorationscljs

(set-decorations decoration-type ranges-or-options)

Adds a set of decorations to the text editor. If a set of decorations already exists with the given {@link TextEditorDecorationType decoration type}, they will be replaced. If rangesOrOptions is empty, the existing decorations with the given {@link TextEditorDecorationType decoration type} will be removed.

Parameters:

  • decoration-type: TextEditorDecorationType - A decoration type.
  • ranges-or-options: readonly Range[] | readonly DecorationOptions[] - Either {@link Range ranges} or more detailed {@link DecorationOptions options}.

Returns: void

Adds a set of decorations to the text editor. If a set of decorations already exists with
the given {@link TextEditorDecorationType decoration type}, they will be replaced. If
`rangesOrOptions` is empty, the existing decorations with the given {@link TextEditorDecorationType decoration type}
will be removed.

**Parameters:**
- `decoration-type`: `TextEditorDecorationType` - A decoration type.
- `ranges-or-options`: `readonly Range[] | readonly DecorationOptions[]` - Either {@link Range ranges} or more detailed {@link DecorationOptions options}.

**Returns:** `void`
sourceraw docstring

set-options!cljs

(set-options! value)

Text editor options.

Text editor options.
sourceraw docstring

set-selection!cljs

(set-selection! value)

The primary selection on this text editor. Shorthand for TextEditor.selections[0].

The primary selection on this text editor. Shorthand for `TextEditor.selections[0]`.
sourceraw docstring

set-selections!cljs

(set-selections! value)

The selections in this text editor. The primary selection is always at index 0.

The selections in this text editor. The primary selection is always at index 0.
sourceraw docstring

showcljs

(show)
(show column)

Show the text editor.

Parameters:

  • column: ViewColumn | undefined - The {@link ViewColumn column} in which to show this editor. This method shows unexpected behavior and will be removed in the next major update.

Returns: void

Show the text editor.

**Parameters:**
- `column`: `ViewColumn | undefined` - The {@link ViewColumn column} in which to show this editor.
This method shows unexpected behavior and will be removed in the next major update.

**Returns:** `void`
sourceraw docstring

view-columncljs

(view-column)

The column in which this editor shows. Will be undefined in case this isn't one of the main editors, e.g. an embedded editor, or when the editor column is larger than three.

The column in which this editor shows. Will be `undefined` in case this
isn't one of the main editors, e.g. an embedded editor, or when the editor
column is larger than three.
sourceraw docstring

visible-rangescljs

(visible-ranges)

The current visible ranges in the editor (vertically). This accounts only for vertical scrolling, and not for horizontal scrolling.

The current visible ranges in the editor (vertically).
This accounts only for vertical scrolling, and not for horizontal scrolling.
sourceraw docstring

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

× close