A code lens provider adds {@link Command commands} to source text. The commands will be shown as dedicated horizontal lines in between the source text.
A code lens provider adds {@link Command commands} to source text. The commands will be shown as dedicated horizontal lines in between the source text.
(on-did-change-code-lenses code-lens-provider)
(on-did-change-code-lenses code-lens-provider listener)
(on-did-change-code-lenses code-lens-provider listener this-args)
(on-did-change-code-lenses code-lens-provider listener this-args disposables)
An optional event to signal that the code lenses 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 the code lenses 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-code-lenses code-lens-provider document token)
Compute a list of {@link CodeLens lenses}. This call should return as fast as possible and if computing the commands is expensive implementors should only return code lens objects with the range set and implement {@link CodeLensProvider.resolveCodeLens resolve}.
Parameters:
document
: TextDocument
- The document in which the command was invoked.token
: CancellationToken
- A cancellation token.Returns: ProviderResult<T[]>
- An array of code lenses or a thenable that resolves to such. The lack of a result can be
signaled by returning undefined
, null
, or an empty array.
Compute a list of {@link CodeLens lenses}. This call should return as fast as possible and if computing the commands is expensive implementors should only return code lens objects with the range set and implement {@link CodeLensProvider.resolveCodeLens resolve}. **Parameters:** - `document`: `TextDocument` - The document in which the command was invoked. - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<T[]>` - An array of code lenses or a thenable that resolves to such. The lack of a result can be signaled by returning `undefined`, `null`, or an empty array.
(resolve-code-lens code-lens-provider code-lens token)
This function will be called for each visible code lens, usually when scrolling and after calls to {@link CodeLensProvider.provideCodeLenses compute}-lenses.
Parameters:
code-lens
: T
- Code lens that must be resolved.token
: CancellationToken
- A cancellation token.Returns: ProviderResult<T>
- The given, resolved code lens or thenable that resolves to such.
This function will be called for each visible code lens, usually when scrolling and after calls to {@link CodeLensProvider.provideCodeLenses compute}-lenses. **Parameters:** - `code-lens`: `T` - Code lens that must be resolved. - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<T>` - The given, resolved code lens or thenable that resolves to such.
(set-on-did-change-code-lenses! code-lens-provider value)
An optional event to signal that the code lenses from this provider have changed.
An optional event to signal that the code lenses from this provider have changed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close