The inlay hints provider interface defines the contract between extensions and the inlay hints feature.
The inlay hints provider interface defines the contract between extensions and the inlay hints feature.
(on-did-change-inlay-hints inlay-hints-provider)
(on-did-change-inlay-hints inlay-hints-provider listener)
(on-did-change-inlay-hints inlay-hints-provider listener this-args)
(on-did-change-inlay-hints inlay-hints-provider listener this-args disposables)
An optional event to signal that inlay hints from this provider 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 optional event to signal that inlay hints from this provider 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.
(provide-inlay-hints inlay-hints-provider document range token)
Provide inlay hints for the given range and document.
Note that inlay hints that are not {@link Range.contains contained} by the given range are ignored.
Parameters:
document
: TextDocument
- The document in which the command was invoked.range
: Range
- The range for which inlay hints should be computed.token
: CancellationToken
- A cancellation token.Returns: ProviderResult<T[]>
- An array of inlay hints or a thenable that resolves to such.
Provide inlay hints for the given range and document. *Note* that inlay hints that are not {@link Range.contains contained} by the given range are ignored. **Parameters:** - `document`: `TextDocument` - The document in which the command was invoked. - `range`: `Range` - The range for which inlay hints should be computed. - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<T[]>` - An array of inlay hints or a thenable that resolves to such.
(resolve-inlay-hint inlay-hints-provider hint token)
Given an inlay hint fill in {@link InlayHint.tooltip tooltip}, {@link InlayHint.textEdits text edits}, or complete label {@link InlayHintLabelPart parts}.
Note that the editor will resolve an inlay hint at most once.
Parameters:
hint
: T
- An inlay hint.token
: CancellationToken
- A cancellation token.Returns: ProviderResult<T>
- The resolved inlay hint or a thenable that resolves to such. It is OK to return the given item
. When no result is returned, the given item
will be used.
Given an inlay hint fill in {@link InlayHint.tooltip tooltip}, {@link InlayHint.textEdits text edits}, or complete label {@link InlayHintLabelPart parts}. *Note* that the editor will resolve an inlay hint at most once. **Parameters:** - `hint`: `T` - An inlay hint. - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<T>` - The resolved inlay hint or a thenable that resolves to such. It is OK to return the given `item`. When no result is returned, the given `item` will be used.
(set-on-did-change-inlay-hints! inlay-hints-provider value)
An optional event to signal that inlay hints from this provider have changed.
An optional event to signal that inlay hints from this provider have changed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close