Liking cljdoc? Tell your friends :D
ClojureScript only.

dots.vscode.text-document-will-save-event

An event that is fired when a {@link TextDocument document} will be saved.

To make modifications to the document before it is being saved, call the {@linkcode TextDocumentWillSaveEvent.waitUntil waitUntil}-function with a thenable that resolves to an array of {@link TextEdit text edits}.

An event that is fired when a {@link TextDocument document} will be saved.

To make modifications to the document before it is being saved, call the
{@linkcode TextDocumentWillSaveEvent.waitUntil waitUntil}-function with a thenable
that resolves to an array of {@link TextEdit text edits}.
raw docstring

documentcljs

(document text-document-will-save-event)

The document that will be saved.

The document that will be saved.
sourceraw docstring

reasoncljs

(reason text-document-will-save-event)

The reason why save was triggered.

The reason why save was triggered.
sourceraw docstring

wait-untilcljs

(wait-until text-document-will-save-event thenable)

Allows to pause the event loop and to apply {@link TextEdit pre-save-edits}. Edits of subsequent calls to this function will be applied in order. The edits will be ignored if concurrent modifications of the document happened.

Note: This function can only be called during event dispatch and not in an asynchronous manner:

workspace.onWillSaveTextDocument(event => {
	// async, will *throw* an error
	setTimeout(() => event.waitUntil(promise));

	// sync, OK
	event.waitUntil(promise);
})

Allows to pause the event loop until the provided thenable resolved.

Note: This function can only be called during event dispatch.

Parameters:

  • thenable: Thenable<any> - A thenable that delays saving.

Returns: void

Allows to pause the event loop and to apply {@link TextEdit pre-save-edits}.
Edits of subsequent calls to this function will be applied in order. The
edits will be *ignored* if concurrent modifications of the document happened.

*Note:* This function can only be called during event dispatch and not
in an asynchronous manner:

```ts
workspace.onWillSaveTextDocument(event => {
	// async, will *throw* an error
	setTimeout(() => event.waitUntil(promise));

	// sync, OK
	event.waitUntil(promise);
})
```
Allows to pause the event loop until the provided thenable resolved.

*Note:* This function can only be called during event dispatch.

**Parameters:**
- `thenable`: `Thenable<any>` - A thenable that delays saving.

**Returns:** `void`
sourceraw docstring

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

× close