Liking cljdoc? Tell your friends :D

dots.vscode.text-editor

Represents an editor that is attached to a {@link TextDocument document}.

Represents an editor that is attached to a {@link TextDocument document}.
raw docstring

documentcljs

(document text-editor)

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 text-editor callback)
(edit text-editor 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 text-editor)

Hide the text editor.

Returns: void

Hide the text editor.

**Returns:** `void`
sourceraw docstring

insert-snippetcljs

(insert-snippet text-editor snippet)
(insert-snippet text-editor snippet location)
(insert-snippet text-editor 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)

Text editor options.

Text editor options.
sourceraw docstring

reveal-rangecljs

(reveal-range text-editor range)
(reveal-range text-editor 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 text-editor)

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 text-editor)

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 text-editor 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! text-editor value)

Text editor options.

Text editor options.
sourceraw docstring

set-selection!cljs

(set-selection! text-editor 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! text-editor 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 text-editor)
(show text-editor 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 text-editor)

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 text-editor)

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