mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
183
src/vs/monaco.d.ts
vendored
183
src/vs/monaco.d.ts
vendored
@@ -61,7 +61,7 @@ declare module monaco {
|
||||
|
||||
public static as(value: null): Promise<null>;
|
||||
public static as(value: undefined): Promise<undefined>;
|
||||
public static as<T, TPromise extends PromiseLike<T>>(value: TPromise): TPromise;
|
||||
public static as<T, SomePromise extends PromiseLike<T>>(value: SomePromise): SomePromise;
|
||||
public static as<T>(value: T): Promise<T>;
|
||||
|
||||
public static is(value: any): value is PromiseLike<any>;
|
||||
@@ -109,7 +109,7 @@ declare module monaco {
|
||||
*
|
||||
*
|
||||
*/
|
||||
export class Uri {
|
||||
export class Uri implements UriComponents {
|
||||
static isUri(thing: any): thing is Uri;
|
||||
/**
|
||||
* scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'.
|
||||
@@ -161,8 +161,16 @@ declare module monaco {
|
||||
* @param skipEncoding Do not encode the result, default is `false`
|
||||
*/
|
||||
toString(skipEncoding?: boolean): string;
|
||||
toJSON(): any;
|
||||
static revive(data: any): Uri;
|
||||
toJSON(): object;
|
||||
static revive(data: UriComponents | any): Uri;
|
||||
}
|
||||
|
||||
export interface UriComponents {
|
||||
scheme: string;
|
||||
authority: string;
|
||||
path: string;
|
||||
query: string;
|
||||
fragment: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1188,10 +1196,6 @@ declare module monaco.editor {
|
||||
* Options associated with this decoration.
|
||||
*/
|
||||
readonly options: IModelDecorationOptions;
|
||||
/**
|
||||
* A flag describing if this is a problem decoration (e.g. warning/error).
|
||||
*/
|
||||
readonly isForValidation: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1641,12 +1645,6 @@ declare module monaco.editor {
|
||||
getWordUntilPosition(position: IPosition): IWordAtPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* A model that can track markers.
|
||||
*/
|
||||
export interface ITextModelWithMarkers extends ITextModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the behavior of decorations when typing/editing near their edges.
|
||||
* Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior`
|
||||
@@ -1717,12 +1715,18 @@ declare module monaco.editor {
|
||||
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
||||
*/
|
||||
getAllDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
||||
/**
|
||||
* Gets all the decorations that should be rendered in the overview ruler as an array.
|
||||
* @param ownerId If set, it will ignore decorations belonging to other owners.
|
||||
* @param filterOutValidation If set, it will ignore decorations specific to validation (i.e. warnings, errors).
|
||||
*/
|
||||
getOverviewRulerDecorations(ownerId?: number, filterOutValidation?: boolean): IModelDecoration[];
|
||||
}
|
||||
|
||||
/**
|
||||
* An editable text model.
|
||||
*/
|
||||
export interface IEditableTextModel extends ITextModelWithMarkers {
|
||||
export interface IEditableTextModel extends ITextModel {
|
||||
/**
|
||||
* Normalize a string containing whitespace according to indentation rules (converts to spaces or to tabs).
|
||||
*/
|
||||
@@ -1766,7 +1770,7 @@ declare module monaco.editor {
|
||||
/**
|
||||
* A model.
|
||||
*/
|
||||
export interface IModel extends IReadOnlyModel, IEditableTextModel, ITextModelWithMarkers, ITokenizedModel, ITextModelWithDecorations {
|
||||
export interface IModel extends IReadOnlyModel, IEditableTextModel, ITokenizedModel, ITextModelWithDecorations {
|
||||
/**
|
||||
* An event emitted when the contents of the model have changed.
|
||||
* @event
|
||||
@@ -1787,6 +1791,11 @@ declare module monaco.editor {
|
||||
* @event
|
||||
*/
|
||||
onDidChangeLanguage(listener: (e: IModelLanguageChangedEvent) => void): IDisposable;
|
||||
/**
|
||||
* An event emitted when the language configuration associated with the model has changed.
|
||||
* @event
|
||||
*/
|
||||
onDidChangeLanguageConfiguration(listener: (e: IModelLanguageConfigurationChangedEvent) => void): IDisposable;
|
||||
/**
|
||||
* An event emitted right before disposing the model.
|
||||
* @event
|
||||
@@ -2185,6 +2194,11 @@ declare module monaco.editor {
|
||||
* @event
|
||||
*/
|
||||
onDidChangeModelLanguage(listener: (e: IModelLanguageChangedEvent) => void): IDisposable;
|
||||
/**
|
||||
* An event emitted when the language configuration of the current model has changed.
|
||||
* @event
|
||||
*/
|
||||
onDidChangeModelLanguageConfiguration(listener: (e: IModelLanguageConfigurationChangedEvent) => void): IDisposable;
|
||||
/**
|
||||
* An event emitted when the options of the current model has changed.
|
||||
* @event
|
||||
@@ -2419,6 +2433,12 @@ declare module monaco.editor {
|
||||
readonly newLanguage: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* An event describing that the language configuration associated with a model has changed.
|
||||
*/
|
||||
export interface IModelLanguageConfigurationChangedEvent {
|
||||
}
|
||||
|
||||
export interface IModelContentChange {
|
||||
/**
|
||||
* The range that got replaced.
|
||||
@@ -2466,18 +2486,6 @@ declare module monaco.editor {
|
||||
* An event describing that model decorations have changed.
|
||||
*/
|
||||
export interface IModelDecorationsChangedEvent {
|
||||
/**
|
||||
* Lists of ids for added decorations.
|
||||
*/
|
||||
readonly addedDecorations: string[];
|
||||
/**
|
||||
* Lists of ids for changed decorations.
|
||||
*/
|
||||
readonly changedDecorations: string[];
|
||||
/**
|
||||
* List of ids for removed decorations.
|
||||
*/
|
||||
readonly removedDecorations: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2683,6 +2691,17 @@ declare module monaco.editor {
|
||||
maxColumn?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for editor minimap
|
||||
*/
|
||||
export interface IEditorLightbulbOptions {
|
||||
/**
|
||||
* Enable the lightbulb code action.
|
||||
* Defaults to true.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration options for the editor.
|
||||
*/
|
||||
@@ -2975,7 +2994,7 @@ declare module monaco.editor {
|
||||
* Accept suggestions on ENTER.
|
||||
* Defaults to 'on'.
|
||||
*/
|
||||
acceptSuggestionOnEnter?: 'on' | 'smart' | 'off';
|
||||
acceptSuggestionOnEnter?: boolean | 'on' | 'smart' | 'off';
|
||||
/**
|
||||
* Accept suggestions on provider defined characters.
|
||||
* Defaults to true.
|
||||
@@ -3018,6 +3037,10 @@ declare module monaco.editor {
|
||||
* Defaults to true.
|
||||
*/
|
||||
codeLens?: boolean;
|
||||
/**
|
||||
* Control the behavior and rendering of the code action lightbulb.
|
||||
*/
|
||||
lightbulb?: IEditorLightbulbOptions;
|
||||
/**
|
||||
* Enable code folding
|
||||
* Defaults to true in vscode and to false in monaco-editor.
|
||||
@@ -3296,6 +3319,7 @@ declare module monaco.editor {
|
||||
readonly matchBrackets: boolean;
|
||||
readonly find: InternalEditorFindOptions;
|
||||
readonly colorDecorators: boolean;
|
||||
readonly lightbulbEnabled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4140,6 +4164,10 @@ declare module monaco.languages {
|
||||
* A human-readable string that represents a doc-comment.
|
||||
*/
|
||||
documentation?: string;
|
||||
/**
|
||||
* A command that should be run upon acceptance of this item.
|
||||
*/
|
||||
command?: Command;
|
||||
/**
|
||||
* A string that should be used when comparing this item
|
||||
* with other items. When `falsy` the [label](#CompletionItem.label)
|
||||
@@ -4197,6 +4225,23 @@ declare module monaco.languages {
|
||||
items: CompletionItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains additional information about the context in which
|
||||
* [completion provider](#CompletionItemProvider.provideCompletionItems) is triggered.
|
||||
*/
|
||||
export interface CompletionContext {
|
||||
/**
|
||||
* How the completion was triggered.
|
||||
*/
|
||||
triggerKind: SuggestTriggerKind;
|
||||
/**
|
||||
* Character that triggered the completion item provider.
|
||||
*
|
||||
* `undefined` if provider was not triggered by a character.
|
||||
*/
|
||||
triggerCharacter?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The completion item provider interface defines the contract between extensions and
|
||||
* the [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).
|
||||
@@ -4213,7 +4258,7 @@ declare module monaco.languages {
|
||||
/**
|
||||
* Provide completion items for the given position and document.
|
||||
*/
|
||||
provideCompletionItems(model: editor.IReadOnlyModel, position: Position, token: CancellationToken): CompletionItem[] | Thenable<CompletionItem[]> | CompletionList | Thenable<CompletionList>;
|
||||
provideCompletionItems(document: editor.IReadOnlyModel, position: Position, token: CancellationToken, context: CompletionContext): CompletionItem[] | Thenable<CompletionItem[]> | CompletionList | Thenable<CompletionList>;
|
||||
/**
|
||||
* Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation)
|
||||
* or [details](#CompletionItem.detail).
|
||||
@@ -4278,6 +4323,10 @@ declare module monaco.languages {
|
||||
* settings will be used.
|
||||
*/
|
||||
surroundingPairs?: IAutoClosingPair[];
|
||||
/**
|
||||
* The language's folding rules.
|
||||
*/
|
||||
folding?: FoldingRules;
|
||||
/**
|
||||
* **Deprecated** Do not use.
|
||||
*
|
||||
@@ -4308,6 +4357,34 @@ declare module monaco.languages {
|
||||
unIndentedLinePattern?: RegExp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes language specific folding markers such as '#region' and '#endregion'.
|
||||
* The start and end regexes will be tested against the contents of all lines and must be designed efficiently:
|
||||
* - the regex should start with '^'
|
||||
* - regexp flags (i, g) are ignored
|
||||
*/
|
||||
export interface FoldingMarkers {
|
||||
start: RegExp;
|
||||
end: RegExp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes folding rules for a language.
|
||||
*/
|
||||
export interface FoldingRules {
|
||||
/**
|
||||
* Used by the indentation based strategy to decide wheter empty lines belong to the previous or the next block.
|
||||
* A language adheres to the off-side rule if blocks in that language are expressed by their indentation.
|
||||
* See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information.
|
||||
* If not set, `false` is used and empty lines belong to the previous block.
|
||||
*/
|
||||
offSide?: boolean;
|
||||
/**
|
||||
* Region markers used by the language.
|
||||
*/
|
||||
markers?: FoldingMarkers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes a rule to be evaluated when pressing Enter.
|
||||
*/
|
||||
@@ -4445,6 +4522,14 @@ declare module monaco.languages {
|
||||
provideHover(model: editor.IReadOnlyModel, position: Position, token: CancellationToken): Hover | Thenable<Hover>;
|
||||
}
|
||||
|
||||
/**
|
||||
* How a suggest provider was triggered.
|
||||
*/
|
||||
export enum SuggestTriggerKind {
|
||||
Invoke = 0,
|
||||
TriggerCharacter = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a parameter of a callable-signature. A parameter can
|
||||
* have a label and a doc-comment.
|
||||
@@ -4459,7 +4544,7 @@ declare module monaco.languages {
|
||||
* The human-readable doc-comment of this signature. Will be shown
|
||||
* in the UI but can be omitted.
|
||||
*/
|
||||
documentation?: string;
|
||||
documentation?: string | IMarkdownString;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4477,7 +4562,7 @@ declare module monaco.languages {
|
||||
* The human-readable doc-comment of this signature. Will be shown
|
||||
* in the UI but can be omitted.
|
||||
*/
|
||||
documentation?: string;
|
||||
documentation?: string | IMarkdownString;
|
||||
/**
|
||||
* The parameters of this signature.
|
||||
*/
|
||||
@@ -4807,17 +4892,31 @@ declare module monaco.languages {
|
||||
}
|
||||
|
||||
/**
|
||||
* A color formatter.
|
||||
* String representations for a color
|
||||
*/
|
||||
export interface IColorFormatter {
|
||||
readonly supportsTransparency: boolean;
|
||||
format(color: IColor): string;
|
||||
export interface IColorPresentation {
|
||||
/**
|
||||
* The label of this color presentation. It will be shown on the color
|
||||
* picker header. By default this is also the text that is inserted when selecting
|
||||
* this color presentation.
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An [edit](#TextEdit) which is applied to a document when selecting
|
||||
* this presentation for the color.
|
||||
*/
|
||||
textEdit?: TextEdit;
|
||||
/**
|
||||
* An optional array of additional [text edits](#TextEdit) that are applied when
|
||||
* selecting this color presentation.
|
||||
*/
|
||||
additionalTextEdits?: TextEdit[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A color range is a range in a text model which represents a color.
|
||||
*/
|
||||
export interface IColorRange {
|
||||
export interface IColorInformation {
|
||||
/**
|
||||
* The range within the model.
|
||||
*/
|
||||
@@ -4826,10 +4925,6 @@ declare module monaco.languages {
|
||||
* The color represented in this range.
|
||||
*/
|
||||
color: IColor;
|
||||
/**
|
||||
* The available formats for this specific color.
|
||||
*/
|
||||
formatters: IColorFormatter[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4839,7 +4934,11 @@ declare module monaco.languages {
|
||||
/**
|
||||
* Provides the color ranges for a specific model.
|
||||
*/
|
||||
provideColorRanges(model: editor.IReadOnlyModel, token: CancellationToken): IColorRange[] | Thenable<IColorRange[]>;
|
||||
provideDocumentColors(model: editor.IReadOnlyModel, token: CancellationToken): IColorInformation[] | Thenable<IColorInformation[]>;
|
||||
/**
|
||||
* Provide the string representations for a color.
|
||||
*/
|
||||
provideColorPresentations(model: editor.IReadOnlyModel, colorInfo: IColorInformation, token: CancellationToken): IColorPresentation[] | Thenable<IColorPresentation[]>;
|
||||
}
|
||||
|
||||
export interface IResourceEdit {
|
||||
|
||||
Reference in New Issue
Block a user