The folding range provider interface defines the contract between extensions and Folding in the editor.
The folding range provider interface defines the contract between extensions and [Folding](https://code.visualstudio.com/docs/editor/codebasics#_folding) in the editor.
(on-did-change-folding-ranges folding-range-provider)
(on-did-change-folding-ranges folding-range-provider listener)
(on-did-change-folding-ranges folding-range-provider listener this-args)
(on-did-change-folding-ranges folding-range-provider
listener
this-args
disposables)
An optional event to signal that the folding ranges 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 folding ranges 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-folding-ranges folding-range-provider document context token)
Returns a list of folding ranges or null and undefined if the provider does not want to participate or was cancelled.
Parameters:
document
: TextDocument
- The document in which the command was invoked.context
: FoldingContext
- Additional context information (for future use)token
: CancellationToken
- A cancellation token.Returns: ProviderResult<FoldingRange[]>
Returns a list of folding ranges or null and undefined if the provider does not want to participate or was cancelled. **Parameters:** - `document`: `TextDocument` - The document in which the command was invoked. - `context`: `FoldingContext` - Additional context information (for future use) - `token`: `CancellationToken` - A cancellation token. **Returns:** `ProviderResult<FoldingRange[]>`
(set-on-did-change-folding-ranges! folding-range-provider value)
An optional event to signal that the folding ranges from this provider have changed.
An optional event to signal that the folding ranges from this provider have changed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close