Liking cljdoc? Tell your friends :D

dots.vscode.text-document-content-provider

A text document content provider allows to add readonly documents to the editor, such as source from a dll or generated html from md.

Content providers are {@link workspace.registerTextDocumentContentProvider registered} for a {@link Uri.scheme uri-scheme}. When a uri with that scheme is to be {@link workspace.openTextDocument loaded} the content provider is asked.

A text document content provider allows to add readonly documents
to the editor, such as source from a dll or generated html from md.

Content providers are {@link workspace.registerTextDocumentContentProvider registered}
for a {@link Uri.scheme uri-scheme}. When a uri with that scheme is to
be {@link workspace.openTextDocument loaded} the content provider is
asked.
raw docstring

on-did-changecljs

(on-did-change text-document-content-provider)
(on-did-change text-document-content-provider listener)
(on-did-change text-document-content-provider listener this-args)
(on-did-change text-document-content-provider listener this-args disposables)

An event to signal a resource 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 event to signal a resource 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.
sourceraw docstring

provide-text-document-contentcljs

(provide-text-document-content text-document-content-provider uri token)

Provide textual content for a given uri.

The editor will use the returned string-content to create a readonly {@link TextDocument document}. Resources allocated should be released when the corresponding document has been {@link workspace.onDidCloseTextDocument closed}.

Note: The contents of the created {@link TextDocument document} might not be identical to the provided text due to end-of-line-sequence normalization.

Parameters:

  • uri: Uri - An uri which scheme matches the scheme this provider was {@link workspace.registerTextDocumentContentProvider registered} for.
  • token: CancellationToken - A cancellation token.

Returns: ProviderResult<string> - A string or a thenable that resolves to such.

Provide textual content for a given uri.

The editor will use the returned string-content to create a readonly
{@link TextDocument document}. Resources allocated should be released when
the corresponding document has been {@link workspace.onDidCloseTextDocument closed}.

**Note**: The contents of the created {@link TextDocument document} might not be
identical to the provided text due to end-of-line-sequence normalization.

**Parameters:**
- `uri`: `Uri` - An uri which scheme matches the scheme this provider was {@link workspace.registerTextDocumentContentProvider registered} for.
- `token`: `CancellationToken` - A cancellation token.

**Returns:** `ProviderResult<string>` - A string or a thenable that resolves to such.
sourceraw docstring

set-on-did-change!cljs

(set-on-did-change! text-document-content-provider value)

An event to signal a resource has changed.

An event to signal a resource has changed.
sourceraw docstring

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

× close