Skip to content

Commit

Permalink
Improve registerFoldingRangeProvider doc (for #48526)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Apr 30, 2018
1 parent af7757f commit 9d8c8f4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/vs/vscode.d.ts
Expand Up @@ -6899,13 +6899,16 @@ declare module 'vscode' {
/**
* Register a folding range provider.
*
* Multiple folding can be registered for a language. In that case providers are sorted
* by their [score](#languages.match) and the best-matching provider is used. Failure
* of the selected provider will cause a failure of the whole operation.
* Multiple providers can be registered for a language. In that case providers are asked in
* parallel and the results are merged.
* If multiple folding ranges start at the same position, only the range of the first registered provider is used.
* If a folding range overlaps with an other range that has a smaller position, it is also ignored.
*
* A failing provider (rejected promise or exception) will
* not cause a failure of the whole operation.
*
* @param selector A selector that defines the documents this provider is applicable to.
* @param provider A folding range provider.
* @param metadata Metadata about the kind of code actions the provider providers.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
export function registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable;
Expand Down

0 comments on commit 9d8c8f4

Please sign in to comment.