mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Definition link API (#52230)
* Definition link Add a new `DefinitionLink` type. This type allows definition providers to return additional metadata about a definition, such as the defining span. Hook up this new provider for typescript This PR replaces #48001 * Correctly mark field optional * Small code fixes - Use lift - Remove unused param * Adding documentation
This commit is contained in:
@@ -752,6 +752,13 @@ export interface LocationDto {
|
||||
range: IRange;
|
||||
}
|
||||
|
||||
export interface DefinitionLinkDto {
|
||||
origin?: IRange;
|
||||
uri: UriComponents;
|
||||
range: IRange;
|
||||
selectionRange?: IRange;
|
||||
}
|
||||
|
||||
export interface WorkspaceSymbolDto extends IdObject {
|
||||
name: string;
|
||||
containerName?: string;
|
||||
@@ -808,7 +815,7 @@ export interface ExtHostLanguageFeaturesShape {
|
||||
$provideDocumentSymbols(handle: number, resource: UriComponents): TPromise<modes.DocumentSymbol[]>;
|
||||
$provideCodeLenses(handle: number, resource: UriComponents): TPromise<modes.ICodeLensSymbol[]>;
|
||||
$resolveCodeLens(handle: number, resource: UriComponents, symbol: modes.ICodeLensSymbol): TPromise<modes.ICodeLensSymbol>;
|
||||
$provideDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise<LocationDto | LocationDto[]>;
|
||||
$provideDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise<DefinitionLinkDto[]>;
|
||||
$provideImplementation(handle: number, resource: UriComponents, position: IPosition): TPromise<LocationDto | LocationDto[]>;
|
||||
$provideTypeDefinition(handle: number, resource: UriComponents, position: IPosition): TPromise<LocationDto | LocationDto[]>;
|
||||
$provideHover(handle: number, resource: UriComponents, position: IPosition): TPromise<modes.Hover>;
|
||||
|
||||
Reference in New Issue
Block a user