Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -433,7 +433,7 @@ export interface CompletionItem {
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
*/
range?: IRange;
range: IRange;
/**
* An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous
@@ -450,13 +450,6 @@ export interface CompletionItem {
* A command that should be run upon acceptance of this item.
*/
command?: Command;
/**@internal*/
_labelLow?: string;
/**@internal*/
_sortTextLow?: string;
/**@internal*/
_filterTextLow?: string;
}
export interface CompletionList {
@@ -523,6 +516,7 @@ export interface CodeAction {
edit?: WorkspaceEdit;
diagnostics?: IMarkerData[];
kind?: string;
isPreferred?: boolean;
}
/**
@@ -625,6 +619,7 @@ export interface SignatureHelpContext {
readonly triggerKind: SignatureHelpTriggerKind;
readonly triggerCharacter?: string;
readonly isRetrigger: boolean;
readonly activeSignatureHelp?: SignatureHelp;
}
/**
@@ -721,20 +716,42 @@ export interface Location {
*/
range: IRange;
}
/**
* The definition of a symbol represented as one or many [locations](#Location).
* For most programming languages there is only one location at which a symbol is
* defined.
*/
export type Definition = Location | Location[];
export interface DefinitionLink {
origin?: IRange;
export interface LocationLink {
/**
* A range to select where this link originates from.
*/
originSelectionRange?: IRange;
/**
* The target uri this link points to.
*/
uri: URI;
/**
* The full range this link points to.
*/
range: IRange;
selectionRange?: IRange;
/**
* A range to select this link points to. Must be contained
* in `LocationLink.range`.
*/
targetSelectionRange?: IRange;
}
/**
* @internal
*/
export function isLocationLink(thing: any): thing is LocationLink {
return thing
&& URI.isUri((thing as LocationLink).uri)
&& Range.isIRange((thing as LocationLink).range)
&& (Range.isIRange((thing as LocationLink).originSelectionRange) || Range.isIRange((thing as LocationLink).targetSelectionRange));
}
export type Definition = Location | Location[] | LocationLink[];
/**
* The definition provider interface defines the contract between extensions and
* the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
@@ -744,7 +761,7 @@ export interface DefinitionProvider {
/**
* Provide the definition of the symbol at the given position and document.
*/
provideDefinition(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
provideDefinition(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
}
/**
@@ -756,7 +773,7 @@ export interface DeclarationProvider {
/**
* Provide the declaration of the symbol at the given position and document.
*/
provideDeclaration(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
provideDeclaration(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
}
/**
@@ -767,7 +784,7 @@ export interface ImplementationProvider {
/**
* Provide the implementation of the symbol at the given position and document.
*/
provideImplementation(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
provideImplementation(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
}
/**
@@ -778,7 +795,7 @@ export interface TypeDefinitionProvider {
/**
* Provide the type definition of the symbol at the given position and document.
*/
provideTypeDefinition(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | DefinitionLink[]>;
provideTypeDefinition(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
}
/**
@@ -896,6 +913,9 @@ export interface FormattingOptions {
* the formatting-feature.
*/
export interface DocumentFormattingEditProvider {
displayName?: string;
/**
* Provide formatting edits for a whole document.
*/
@@ -906,6 +926,9 @@ export interface DocumentFormattingEditProvider {
* the formatting-feature.
*/
export interface DocumentRangeFormattingEditProvider {
displayName?: string;
/**
* Provide formatting edits for a range in a document.
*
@@ -1032,11 +1055,16 @@ export interface DocumentColorProvider {
provideColorPresentations(model: model.ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;
}
export interface SelectionRange {
kind: string;
range: IRange;
}
export interface SelectionRangeProvider {
/**
* Provide ranges that should be selected from the given position.
*/
provideSelectionRanges(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<IRange[]>;
provideSelectionRanges(model: model.ITextModel, position: Position, token: CancellationToken): ProviderResult<SelectionRange[]>;
}
export interface FoldingContext {
@@ -1122,7 +1150,7 @@ export interface ResourceTextEdit {
}
export interface WorkspaceEdit {
edits?: Array<ResourceTextEdit | ResourceFileEdit>;
edits: Array<ResourceTextEdit | ResourceFileEdit>;
}
export interface Rejection {
@@ -1150,6 +1178,7 @@ export interface Command {
* @internal
*/
export interface CommentInfo {
extensionId: string;
threads: CommentThread[];
commentingRanges?: IRange[];
reply?: Command;
@@ -1183,6 +1212,7 @@ export enum CommentThreadCollapsibleState {
* @internal
*/
export interface CommentThread {
extensionId: string;
threadId: string;
resource: string;
range: IRange;
@@ -1199,6 +1229,14 @@ export interface NewCommentAction {
actions: Command[];
}
/**
* @internal
*/
export interface CommentReaction {
readonly label?: string;
readonly hasReacted?: boolean;
}
/**
* @internal
*/
@@ -1211,6 +1249,7 @@ export interface Comment {
readonly canDelete?: boolean;
readonly command?: Command;
readonly isDraft?: boolean;
readonly commentReactions?: CommentReaction[];
}
/**
@@ -1247,13 +1286,18 @@ export interface DocumentCommentProvider {
replyToCommentThread(resource: URI, range: Range, thread: CommentThread, text: string, token: CancellationToken): Promise<CommentThread>;
editComment(resource: URI, comment: Comment, text: string, token: CancellationToken): Promise<void>;
deleteComment(resource: URI, comment: Comment, token: CancellationToken): Promise<void>;
startDraft?(token: CancellationToken): Promise<void>;
deleteDraft?(token: CancellationToken): Promise<void>;
finishDraft?(token: CancellationToken): Promise<void>;
startDraft?(resource: URI, token: CancellationToken): Promise<void>;
deleteDraft?(resource: URI, token: CancellationToken): Promise<void>;
finishDraft?(resource: URI, token: CancellationToken): Promise<void>;
startDraftLabel?: string;
deleteDraftLabel?: string;
finishDraftLabel?: string;
addReaction?(resource: URI, comment: Comment, reaction: CommentReaction, token: CancellationToken): Promise<void>;
deleteReaction?(resource: URI, comment: Comment, reaction: CommentReaction, token: CancellationToken): Promise<void>;
reactionGroup?: CommentReaction[];
onDidChangeCommentThreads(): Event<CommentThreadChangedEvent>;
}
@@ -1412,7 +1456,7 @@ export interface ITokenizationRegistry {
/**
* Register a promise for a tokenization support.
*/
registerPromise(language: string, promise: Thenable<ITokenizationSupport>): Thenable<IDisposable>;
registerPromise(language: string, promise: Thenable<ITokenizationSupport>): IDisposable;
/**
* Get the tokenization support for a language.