The document color provider defines the contract between extensions and feature of picking and modifying colors in the editor.
The document color provider defines the contract between extensions and feature of picking and modifying colors in the editor.
(provide-color-presentations document-color-provider color context token)
Provide {@link ColorPresentation representations} for a color.
Parameters:
color
: Color
- The color to show and insert.context
: { readonly document: TextDocument; readonly range: Range; }
- A context object with additional informationtoken
: CancellationToken
- A cancellation token.Returns: ProviderResult<ColorPresentation[]>
- An array of color presentations or a thenable that resolves to such. The lack of a result
can be signaled by returning undefined
, null
, or an empty array.
Provide {@link ColorPresentation representations} for a color. **Parameters:** - `color`: `Color` - The color to show and insert. - `context`: `{ readonly document: TextDocument; readonly range: Range; }` - A context object with additional information - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<ColorPresentation[]>` - An array of color presentations or a thenable that resolves to such. The lack of a result can be signaled by returning `undefined`, `null`, or an empty array.
(provide-document-colors document-color-provider document token)
Provide colors for the given document.
Parameters:
document
: TextDocument
- The document in which the command was invoked.token
: CancellationToken
- A cancellation token.Returns: ProviderResult<ColorInformation[]>
- An array of {@link ColorInformationcolor information} or a thenable that resolves to such. The lack of a result
can be signaled by returning undefined
, null
, or an empty array.
Provide colors for the given document. **Parameters:** - `document`: `TextDocument` - The document in which the command was invoked. - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<ColorInformation[]>` - An array of {@link ColorInformationcolor information} or a thenable that resolves to such. The lack of a result can be signaled by returning `undefined`, `null`, or an empty array.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close