-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
packages/types/vscode/typings/vscode.proposed.multiDocumentHighlightProvider.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
declare module 'vscode' { | ||
|
||
/** | ||
* Represents a collection of document highlights from multiple documents. | ||
*/ | ||
export class MultiDocumentHighlight { | ||
|
||
/** | ||
* The URI of the document containing the highlights. | ||
*/ | ||
uri: Uri; | ||
|
||
/** | ||
* The highlights for the document. | ||
*/ | ||
highlights: DocumentHighlight[]; | ||
|
||
/** | ||
* Creates a new instance of MultiDocumentHighlight. | ||
* @param uri The URI of the document containing the highlights. | ||
* @param highlights The highlights for the document. | ||
*/ | ||
constructor(uri: Uri, highlights: DocumentHighlight[]); | ||
} | ||
|
||
export interface MultiDocumentHighlightProvider { | ||
|
||
/** | ||
* Provide a set of document highlights, like all occurrences of a variable or | ||
* all exit-points of a function. | ||
* | ||
* @param document The document in which the command was invoked. | ||
* @param position The position at which the command was invoked. | ||
* @param otherDocuments An array of additional valid documents for which highlights should be provided. | ||
* @param token A cancellation token. | ||
* @returns A Map containing a mapping of the Uri of a document to the document highlights or a thenable that resolves to such. The lack of a result can be | ||
* signaled by returning `undefined`, `null`, or an empty map. | ||
*/ | ||
provideMultiDocumentHighlights(document: TextDocument, position: Position, otherDocuments: TextDocument[], token: CancellationToken): ProviderResult<MultiDocumentHighlight[]>; | ||
} | ||
|
||
namespace languages { | ||
|
||
/** | ||
* Register a multi document highlight provider. | ||
* | ||
* Multiple providers can be registered for a language. In that case providers are sorted | ||
* by their {@link languages.match score} and groups sequentially asked for document highlights. | ||
* The process stops when a provider returns a `non-falsy` or `non-failure` result. | ||
* | ||
* @param selector A selector that defines the documents this provider is applicable to. | ||
* @param provider A multi-document highlight provider. | ||
* @returns A {@link Disposable} that unregisters this provider when being disposed. | ||
*/ | ||
export function registerMultiDocumentHighlightProvider(selector: DocumentSelector, provider: MultiDocumentHighlightProvider): Disposable; | ||
} | ||
|
||
} |
5849361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Next publish successful!
3.5.1-next-1731935606.0