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

@@ -18,15 +18,44 @@ declare module 'vscode' {
//#region Joh - selection range provider
export class SelectionRangeKind {
/**
* Empty Kind.
*/
static readonly Empty: SelectionRangeKind;
/**
* The statement kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
static readonly Statement: SelectionRangeKind;
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
static readonly Declaration: SelectionRangeKind;
readonly value: string;
private constructor(value: string);
append(value: string): SelectionRangeKind;
}
export class SelectionRange {
kind: SelectionRangeKind;
range: Range;
constructor(range: Range, kind: SelectionRangeKind);
}
export interface SelectionRangeProvider {
/**
* Provide selection ranges starting at a given position. The first range must [contain](#Range.contains)
* position and subsequent ranges must contain the previous range.
* @param document
* @param position
* @param token
*/
provideSelectionRanges(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<Range[]>;
provideSelectionRanges(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<SelectionRange[]>;
}
export namespace languages {
@@ -38,7 +67,7 @@ declare module 'vscode' {
//#region Joh - read/write in chunks
export interface FileSystemProvider {
open?(resource: Uri): number | Thenable<number>;
open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
close?(fd: number): void | Thenable<void>;
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
@@ -527,34 +556,12 @@ declare module 'vscode' {
// deprecated
export interface DebugAdapterTracker {
// VS Code -> Debug Adapter
startDebugAdapter?(): void;
toDebugAdapter?(message: any): void;
stopDebugAdapter?(): void;
// Debug Adapter -> VS Code
fromDebugAdapter?(message: any): void;
debugAdapterError?(error: Error): void;
debugAdapterExit?(code?: number, signal?: string): void;
}
export interface DebugConfigurationProvider {
/**
* Deprecated, use DebugAdapterDescriptorFactory.provideDebugAdapter instead.
* @deprecated Use DebugAdapterDescriptorFactory.createDebugAdapterDescriptor instead
*/
debugAdapterExecutable?(folder: WorkspaceFolder | undefined, token?: CancellationToken): ProviderResult<DebugAdapterExecutable>;
/**
* Deprecated, use DebugAdapterTrackerFactory.createDebugAdapterTracker instead.
* @deprecated Use DebugAdapterTrackerFactory.createDebugAdapterTracker instead
*
* The optional method 'provideDebugAdapterTracker' is called at the start of a debug session to provide a tracker that gives access to the communication between VS Code and a Debug Adapter.
* @param session The [debug session](#DebugSession) for which the tracker will be used.
* @param token A cancellation token.
*/
provideDebugAdapterTracker?(session: DebugSession, workspaceFolder: WorkspaceFolder | undefined, config: DebugConfiguration, token?: CancellationToken): ProviderResult<DebugAdapterTracker>;
}
//#endregion
@@ -786,6 +793,7 @@ declare module 'vscode' {
command?: Command;
isDraft?: boolean;
commentReactions?: CommentReaction[];
}
export interface CommentThreadChangedEvent {
@@ -810,6 +818,11 @@ declare module 'vscode' {
readonly inDraftMode: boolean;
}
interface CommentReaction {
readonly label?: string;
readonly hasReacted?: boolean;
}
interface DocumentCommentProvider {
/**
* Provide the commenting ranges and comment threads for the given document. The comments are displayed within the editor.
@@ -836,14 +849,18 @@ declare module 'vscode' {
*/
deleteComment?(document: TextDocument, comment: Comment, token: CancellationToken): Promise<void>;
startDraft?(token: CancellationToken): Promise<void>;
deleteDraft?(token: CancellationToken): Promise<void>;
finishDraft?(token: CancellationToken): Promise<void>;
startDraft?(document: TextDocument, token: CancellationToken): Promise<void>;
deleteDraft?(document: TextDocument, token: CancellationToken): Promise<void>;
finishDraft?(document: TextDocument, token: CancellationToken): Promise<void>;
startDraftLabel?: string;
deleteDraftLabel?: string;
finishDraftLabel?: string;
addReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise<void>;
deleteReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise<void>;
reactionGroup?: CommentReaction[];
/**
* Notify of updates to comment threads.
*/
@@ -898,7 +915,7 @@ declare module 'vscode' {
/**
* Represents a terminal without a process where all interaction and output in the terminal is
* controlled by an extension. This is similar to an output window but has the same VT sequence
* compatility as the regular terminal.
* compatibility as the regular terminal.
*
* Note that an instance of [Terminal](#Terminal) will be created when a TerminalRenderer is
* created with all its APIs available for use by extensions. When using the Terminal object
@@ -946,7 +963,7 @@ declare module 'vscode' {
readonly maximumDimensions: TerminalDimensions | undefined;
/**
* The corressponding [Terminal](#Terminal) for this TerminalRenderer.
* The corresponding [Terminal](#Terminal) for this TerminalRenderer.
*/
readonly terminal: Terminal;
@@ -978,9 +995,9 @@ declare module 'vscode' {
* ```typescript
* const terminalRenderer = window.createTerminalRenderer('test');
* terminalRenderer.onDidAcceptInput(data => {
* cosole.log(data); // 'Hello world'
* console.log(data); // 'Hello world'
* });
* terminalRenderer.terminal.then(t => t.sendText('Hello world'));
* terminalRenderer.terminal.sendText('Hello world');
* ```
*/
readonly onDidAcceptInput: Event<string>;
@@ -1081,18 +1098,48 @@ declare module 'vscode' {
}
//#endregion
//#region Extension Context
export interface ExtensionContext {
//#region SignatureHelpContext active parameters - mjbvz
export interface SignatureHelpContext {
/**
* An absolute file path in which the extension can store gloabal state.
* The directory might not exist on disk and creation is
* up to the extension. However, the parent directory is guaranteed to be existent.
* The currently active [`SignatureHelp`](#SignatureHelp).
*
* Use [`globalState`](#ExtensionContext.globalState) to store key value data.
* The `activeSignatureHelp` has its [`SignatureHelp.activeSignature`] field updated based on
* the user arrowing through available signatures.
*/
globalStoragePath: string;
readonly activeSignatureHelp?: SignatureHelp;
}
//#endregion
//#region CodeAction.isPreferred - mjbvz
export interface CodeAction {
/**
* Marks this as a preferred action. Preferred actions are used by the `auto fix` command.
*
* A quick fix should be marked preferred if it properly addresses the underlying error.
* A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
*/
isPreferred?: boolean;
}
//#endregion
//#region Tasks
export interface TaskPresentationOptions {
/**
* Controls whether the task is executed in a specific terminal group using split panes.
*/
group?: string;
}
//#endregion
//#region Autofix - mjbvz
export namespace CodeActionKind {
/**
* Base kind for auto-fix source actions: `source.fixAll`.
*
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
*/
export const SourceFixAll: CodeActionKind;
}
//#endregion
}