update dependencies, changelog

This commit is contained in:
Peng Lyu 2018-05-11 11:58:59 -07:00
parent 8f3204478a
commit 6dc4fba5de
5 changed files with 251 additions and 37 deletions

View file

@ -1,5 +1,23 @@
# Monaco Editor Change log # Monaco Editor Change log
## [0.13.0] (11.05.2018)
### New & Noteworthy
* New folding provider `registerFoldingRangeProvider`.
* You can now specifies the stack order of a decoration by setting `IModelDecorationOptions.zIndex`. A decoration with greater stack order is always in front of a decoration with a lower stack order.
* You can now tell Monaco if there is an `inlineClassName` which affects letter spacing. the stack order of a decoration by setting `IModelDecorationOptions.inlineClassNameAffectsLetterSpacing`.
* Get the text length for a certain line on text model (`ITextModel.getLineLength(lineNumber: number)`)
* New option `codeActionsOnSave`, controls whether code action kinds will be run on save.
* New option `codeActionsOnSaveTimeout`, controls timeout for running code actions on save.
* New option `multiCursorMergeOverlapping`, controls if overlapping selections should be merged. Default to `true`.
### Breaking Change
* Removed `ICodeEditor.getCenteredRangeInViewport`.
* `RenameProvider.resolveRenameLocation` now returns `RenameLocation` instead of `IRange`.
### Thank you
* [Sergey Romanov @Serhioromano](https://github.com/Serhioromano): Add new language Structured Text support [PR monaco-languages#32](https://github.com/Microsoft/monaco-languages/pull/32)
* [Yukai Huang @Yukaii](https://github.com/Yukaii): Fix backspace in IME composition on iOS Safari [PR vscode#40546](https://github.com/Microsoft/vscode/pull/40546)
## [0.12.0] (11.04.2018) ## [0.12.0] (11.04.2018)
* Special thanks to [Tim Kendrick](https://github.com/timkendrick) for contributing a webpack plugin - `monaco-editor-webpack-plugin` - now available on [npm](https://www.npmjs.com/package/monaco-editor-webpack-plugin). * Special thanks to [Tim Kendrick](https://github.com/timkendrick) for contributing a webpack plugin - `monaco-editor-webpack-plugin` - now available on [npm](https://www.npmjs.com/package/monaco-editor-webpack-plugin).

114
monaco.d.ts vendored
View file

@ -1,6 +1,6 @@
/*!----------------------------------------------------------- /*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Type definitions for monaco-editor v0.12.0 * Type definitions for monaco-editor v0.13.0
* Released under the MIT license * Released under the MIT license
*-----------------------------------------------------------*/ *-----------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------- /*---------------------------------------------------------------------------------------------
@ -1198,6 +1198,11 @@ declare namespace monaco.editor {
* Should the decoration expand to encompass a whole line. * Should the decoration expand to encompass a whole line.
*/ */
isWholeLine?: boolean; isWholeLine?: boolean;
/**
* Specifies the stack order of a decoration.
* A decoration with greater stack order is always in front of a decoration with a lower stack order.
*/
zIndex?: number;
/** /**
* If set, render this decoration in the overview ruler. * If set, render this decoration in the overview ruler.
*/ */
@ -1220,6 +1225,10 @@ declare namespace monaco.editor {
* to have a background color decoration. * to have a background color decoration.
*/ */
inlineClassName?: string; inlineClassName?: string;
/**
* If there is an `inlineClassName` which affects letter spacing.
*/
inlineClassNameAffectsLetterSpacing?: boolean;
/** /**
* If set, the decoration will be rendered before the text with this CSS class name. * If set, the decoration will be rendered before the text with this CSS class name.
*/ */
@ -1488,6 +1497,10 @@ declare namespace monaco.editor {
* Get the text for a certain line. * Get the text for a certain line.
*/ */
getLineContent(lineNumber: number): string; getLineContent(lineNumber: number): string;
/**
* Get the text length for a certain line.
*/
getLineLength(lineNumber: number): number;
/** /**
* Get the text for all lines. * Get the text for all lines.
*/ */
@ -2196,6 +2209,10 @@ declare namespace monaco.editor {
* The range that got replaced. * The range that got replaced.
*/ */
readonly range: IRange; readonly range: IRange;
/**
* The offset of the range that got replaced.
*/
readonly rangeOffset: number;
/** /**
* The length of the range that got replaced. * The length of the range that got replaced.
*/ */
@ -2459,6 +2476,13 @@ declare namespace monaco.editor {
enabled?: boolean; enabled?: boolean;
} }
/**
* Configuration map for codeActionsOnSave
*/
export interface ICodeActionsOnSaveOptions {
[kind: string]: boolean;
}
/** /**
* Configuration options for the editor. * Configuration options for the editor.
*/ */
@ -2693,6 +2717,11 @@ declare namespace monaco.editor {
* Defaults to 'alt' * Defaults to 'alt'
*/ */
multiCursorModifier?: 'ctrlCmd' | 'alt'; multiCursorModifier?: 'ctrlCmd' | 'alt';
/**
* Merge overlapping selections.
* Defaults to true
*/
multiCursorMergeOverlapping?: boolean;
/** /**
* Configure the editor's accessibility support. * Configure the editor's accessibility support.
* Defaults to 'auto'. It is best to leave this to 'auto'. * Defaults to 'auto'. It is best to leave this to 'auto'.
@ -2806,6 +2835,14 @@ declare namespace monaco.editor {
* Control the behavior and rendering of the code action lightbulb. * Control the behavior and rendering of the code action lightbulb.
*/ */
lightbulb?: IEditorLightbulbOptions; lightbulb?: IEditorLightbulbOptions;
/**
* Code action kinds to be run on save.
*/
codeActionsOnSave?: ICodeActionsOnSaveOptions;
/**
* Timeout for running code actions on save.
*/
codeActionsOnSaveTimeout?: number;
/** /**
* Enable code folding * Enable code folding
* Defaults to true. * Defaults to true.
@ -3101,6 +3138,8 @@ declare namespace monaco.editor {
readonly find: InternalEditorFindOptions; readonly find: InternalEditorFindOptions;
readonly colorDecorators: boolean; readonly colorDecorators: boolean;
readonly lightbulbEnabled: boolean; readonly lightbulbEnabled: boolean;
readonly codeActionsOnSave: ICodeActionsOnSaveOptions;
readonly codeActionsOnSaveTimeout: number;
} }
/** /**
@ -3114,6 +3153,7 @@ declare namespace monaco.editor {
readonly lineHeight: number; readonly lineHeight: number;
readonly readOnly: boolean; readonly readOnly: boolean;
readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey';
readonly multiCursorMergeOverlapping: boolean;
readonly wordSeparators: string; readonly wordSeparators: string;
readonly autoClosingBrackets: boolean; readonly autoClosingBrackets: boolean;
readonly autoIndent: boolean; readonly autoIndent: boolean;
@ -3251,6 +3291,7 @@ declare namespace monaco.editor {
readonly readOnly: boolean; readonly readOnly: boolean;
readonly accessibilitySupport: boolean; readonly accessibilitySupport: boolean;
readonly multiCursorModifier: boolean; readonly multiCursorModifier: boolean;
readonly multiCursorMergeOverlapping: boolean;
readonly wordSeparators: boolean; readonly wordSeparators: boolean;
readonly autoClosingBrackets: boolean; readonly autoClosingBrackets: boolean;
readonly autoIndent: boolean; readonly autoIndent: boolean;
@ -3767,10 +3808,6 @@ declare namespace monaco.editor {
* Get the layout info for the editor. * Get the layout info for the editor.
*/ */
getLayoutInfo(): EditorLayoutInfo; getLayoutInfo(): EditorLayoutInfo;
/**
* Returns the range that is currently centered in the view port.
*/
getCenteredRangeInViewport(): Range;
/** /**
* Returns the ranges that are currently visible. * Returns the ranges that are currently visible.
* Does not account for horizontal scrolling. * Does not account for horizontal scrolling.
@ -4090,8 +4127,10 @@ declare namespace monaco.languages {
export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable; export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable;
/** /**
* Register a folding provider * Register a folding range provider
*/ */
export function registerFoldingRangeProvider(languageId: string, provider: FoldingRangeProvider): IDisposable;
/** /**
* Contains additional diagnostic information about the context in which * Contains additional diagnostic information about the context in which
* a [code action](#CodeActionProvider.provideCodeActions) is run. * a [code action](#CodeActionProvider.provideCodeActions) is run.
@ -4541,7 +4580,7 @@ declare namespace monaco.languages {
* editor will use the range at the current position or the * editor will use the range at the current position or the
* current position itself. * current position itself.
*/ */
range: IRange; range?: IRange;
} }
/** /**
@ -4985,6 +5024,60 @@ declare namespace monaco.languages {
provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): IColorPresentation[] | Thenable<IColorPresentation[]>; provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): IColorPresentation[] | Thenable<IColorPresentation[]>;
} }
export interface FoldingContext {
}
/**
* A provider of colors for editor models.
*/
export interface FoldingRangeProvider {
/**
* Provides the color ranges for a specific model.
*/
provideFoldingRanges(model: editor.ITextModel, context: FoldingContext, token: CancellationToken): FoldingRange[] | Thenable<FoldingRange[]>;
}
export interface FoldingRange {
/**
* The zero-based start line of the range to fold. The folded area starts after the line's last character.
*/
start: number;
/**
* The zero-based end line of the range to fold. The folded area ends with the line's last character.
*/
end: number;
/**
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
* like 'Fold all comments'. See
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
*/
kind?: FoldingRangeKind;
}
export class FoldingRangeKind {
value: string;
/**
* Kind for folding range representing a comment. The value of the kind is 'comment'.
*/
static readonly Comment: FoldingRangeKind;
/**
* Kind for folding range representing a import. The value of the kind is 'imports'.
*/
static readonly Imports: FoldingRangeKind;
/**
* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).
* The value of the kind is 'region'.
*/
static readonly Region: FoldingRangeKind;
/**
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
*
* @param value of the kind.
*/
constructor(value: string);
}
export interface ResourceFileEdit { export interface ResourceFileEdit {
oldUri: Uri; oldUri: Uri;
newUri: Uri; newUri: Uri;
@ -5001,9 +5094,14 @@ declare namespace monaco.languages {
rejectReason?: string; rejectReason?: string;
} }
export interface RenameLocation {
range: IRange;
text: string;
}
export interface RenameProvider { export interface RenameProvider {
provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): WorkspaceEdit | Thenable<WorkspaceEdit>; provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): WorkspaceEdit | Thenable<WorkspaceEdit>;
resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): IRange | Thenable<IRange>; resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): RenameLocation | Thenable<RenameLocation>;
} }
export interface Command { export interface Command {

32
package-lock.json generated
View file

@ -1,6 +1,6 @@
{ {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.12.0", "version": "0.13.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -2321,33 +2321,33 @@
} }
}, },
"monaco-css": { "monaco-css": {
"version": "2.1.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.1.0.tgz", "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.1.1.tgz",
"integrity": "sha512-zJhj2ny5MZ81n1Pcuv6OhujIbZkbciuckjJ1aBFB8rgmIRSSJIMgih4jpX+N+L9Fhr+z7v6HxhbaGHOK7Ll1rA==", "integrity": "sha512-hlgLz9dnOWmKRNU85Hl9IHrekfxA4EfSq8X5N6pcnmcmtyg4VSZpckazt8l9i+cPRGobFqpu5xCmm0XWDJz6Vw==",
"dev": true "dev": true
}, },
"monaco-editor-core": { "monaco-editor-core": {
"version": "0.12.0", "version": "0.13.1",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.12.0.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.13.1.tgz",
"integrity": "sha512-wOoEVAoZtrarDRcQC32Fp0ocacpQd6/Nb0FmUZOHeD3swZuPZhDLOxTyoNLjKq3d+h/6g+IARBLnDaLT5OQD4g==", "integrity": "sha512-K+cmar8dUF/YcaQXt/3PWKQxA/i7qQLLq5GBWxBKheuW9uOCi25zYInVRgZROeA+jjB6UAowqgYr7ydsbPjbFQ==",
"dev": true "dev": true
}, },
"monaco-html": { "monaco-html": {
"version": "2.1.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.1.0.tgz", "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.1.1.tgz",
"integrity": "sha512-bx28P9DTEEZ714OYGjZsRSbX0mHmsKXApnDB1LddHCLcH7q+svW/ikeJ15p3qeGhxHNAsArtj+Z5C5qlXKvKyA==", "integrity": "sha512-zyEc7Gl3vdpP7ZWyMyq3YdujnDuKQedj27cHCxf6kYv8fh2CNeg+CcMEScbh6hwq3NezIUTLg4uD0Gt5vgWmDQ==",
"dev": true "dev": true
}, },
"monaco-json": { "monaco-json": {
"version": "2.1.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.1.0.tgz", "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.1.1.tgz",
"integrity": "sha512-ZEGoMLmMSo/3EstFpd1m8ggWdsNauurqnondiJj471Pmuke/sJISThKg+6i8yzFGgPSIgeA9xe229WkgXk6xyQ==", "integrity": "sha512-3HP9dZbXS86uKJixXAslDEfh4T5XrPd6QaQQRx43XrCUC8Y4y3QyOqsgdGMp69X2opKpBQnErmRWL0IoRx7PiA==",
"dev": true "dev": true
}, },
"monaco-languages": { "monaco-languages": {
"version": "1.2.0", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.2.0.tgz", "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.3.1.tgz",
"integrity": "sha512-lbFxMOF2F02VGMfyD6dhoPjzYu3H4jTu2o2PDo08JjYgB3Z2lKpDiq1Ri06MjP9A59/YTnvZ3dNC7j7TqDXbQw==", "integrity": "sha512-zOrUBPBUW7RenUoQocl/O5wPlPVR5Ekb4GstgeCxD8PXM5qfU2djdIgAbxIVIPgoGemrQrKKfPV093T0Ot7n4Q==",
"dev": true "dev": true
}, },
"monaco-typescript": { "monaco-typescript": {

View file

@ -22,11 +22,11 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-typedoc": "^2.0.0", "gulp-typedoc": "^2.0.0",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"monaco-css": "2.1.0", "monaco-css": "2.1.1",
"monaco-editor-core": "0.12.0", "monaco-editor-core": "0.13.1",
"monaco-html": "2.1.0", "monaco-html": "2.1.1",
"monaco-json": "2.1.0", "monaco-json": "2.1.1",
"monaco-languages": "1.2.0", "monaco-languages": "1.3.1",
"monaco-typescript": "3.1.0", "monaco-typescript": "3.1.0",
"rimraf": "^2.6.2", "rimraf": "^2.6.2",
"typedoc": "^0.11.1", "typedoc": "^0.11.1",

View file

@ -1,6 +1,6 @@
/*!----------------------------------------------------------- /*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Type definitions for monaco-editor v0.12.0 * Type definitions for monaco-editor v0.13.0
* Released under the MIT license * Released under the MIT license
*-----------------------------------------------------------*/ *-----------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------- /*---------------------------------------------------------------------------------------------
@ -1198,6 +1198,11 @@ declare namespace monaco.editor {
* Should the decoration expand to encompass a whole line. * Should the decoration expand to encompass a whole line.
*/ */
isWholeLine?: boolean; isWholeLine?: boolean;
/**
* Specifies the stack order of a decoration.
* A decoration with greater stack order is always in front of a decoration with a lower stack order.
*/
zIndex?: number;
/** /**
* If set, render this decoration in the overview ruler. * If set, render this decoration in the overview ruler.
*/ */
@ -1220,6 +1225,10 @@ declare namespace monaco.editor {
* to have a background color decoration. * to have a background color decoration.
*/ */
inlineClassName?: string; inlineClassName?: string;
/**
* If there is an `inlineClassName` which affects letter spacing.
*/
inlineClassNameAffectsLetterSpacing?: boolean;
/** /**
* If set, the decoration will be rendered before the text with this CSS class name. * If set, the decoration will be rendered before the text with this CSS class name.
*/ */
@ -1488,6 +1497,10 @@ declare namespace monaco.editor {
* Get the text for a certain line. * Get the text for a certain line.
*/ */
getLineContent(lineNumber: number): string; getLineContent(lineNumber: number): string;
/**
* Get the text length for a certain line.
*/
getLineLength(lineNumber: number): number;
/** /**
* Get the text for all lines. * Get the text for all lines.
*/ */
@ -2196,6 +2209,10 @@ declare namespace monaco.editor {
* The range that got replaced. * The range that got replaced.
*/ */
readonly range: IRange; readonly range: IRange;
/**
* The offset of the range that got replaced.
*/
readonly rangeOffset: number;
/** /**
* The length of the range that got replaced. * The length of the range that got replaced.
*/ */
@ -2459,6 +2476,13 @@ declare namespace monaco.editor {
enabled?: boolean; enabled?: boolean;
} }
/**
* Configuration map for codeActionsOnSave
*/
export interface ICodeActionsOnSaveOptions {
[kind: string]: boolean;
}
/** /**
* Configuration options for the editor. * Configuration options for the editor.
*/ */
@ -2693,6 +2717,11 @@ declare namespace monaco.editor {
* Defaults to 'alt' * Defaults to 'alt'
*/ */
multiCursorModifier?: 'ctrlCmd' | 'alt'; multiCursorModifier?: 'ctrlCmd' | 'alt';
/**
* Merge overlapping selections.
* Defaults to true
*/
multiCursorMergeOverlapping?: boolean;
/** /**
* Configure the editor's accessibility support. * Configure the editor's accessibility support.
* Defaults to 'auto'. It is best to leave this to 'auto'. * Defaults to 'auto'. It is best to leave this to 'auto'.
@ -2806,6 +2835,14 @@ declare namespace monaco.editor {
* Control the behavior and rendering of the code action lightbulb. * Control the behavior and rendering of the code action lightbulb.
*/ */
lightbulb?: IEditorLightbulbOptions; lightbulb?: IEditorLightbulbOptions;
/**
* Code action kinds to be run on save.
*/
codeActionsOnSave?: ICodeActionsOnSaveOptions;
/**
* Timeout for running code actions on save.
*/
codeActionsOnSaveTimeout?: number;
/** /**
* Enable code folding * Enable code folding
* Defaults to true. * Defaults to true.
@ -3101,6 +3138,8 @@ declare namespace monaco.editor {
readonly find: InternalEditorFindOptions; readonly find: InternalEditorFindOptions;
readonly colorDecorators: boolean; readonly colorDecorators: boolean;
readonly lightbulbEnabled: boolean; readonly lightbulbEnabled: boolean;
readonly codeActionsOnSave: ICodeActionsOnSaveOptions;
readonly codeActionsOnSaveTimeout: number;
} }
/** /**
@ -3114,6 +3153,7 @@ declare namespace monaco.editor {
readonly lineHeight: number; readonly lineHeight: number;
readonly readOnly: boolean; readonly readOnly: boolean;
readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey';
readonly multiCursorMergeOverlapping: boolean;
readonly wordSeparators: string; readonly wordSeparators: string;
readonly autoClosingBrackets: boolean; readonly autoClosingBrackets: boolean;
readonly autoIndent: boolean; readonly autoIndent: boolean;
@ -3251,6 +3291,7 @@ declare namespace monaco.editor {
readonly readOnly: boolean; readonly readOnly: boolean;
readonly accessibilitySupport: boolean; readonly accessibilitySupport: boolean;
readonly multiCursorModifier: boolean; readonly multiCursorModifier: boolean;
readonly multiCursorMergeOverlapping: boolean;
readonly wordSeparators: boolean; readonly wordSeparators: boolean;
readonly autoClosingBrackets: boolean; readonly autoClosingBrackets: boolean;
readonly autoIndent: boolean; readonly autoIndent: boolean;
@ -3767,10 +3808,6 @@ declare namespace monaco.editor {
* Get the layout info for the editor. * Get the layout info for the editor.
*/ */
getLayoutInfo(): EditorLayoutInfo; getLayoutInfo(): EditorLayoutInfo;
/**
* Returns the range that is currently centered in the view port.
*/
getCenteredRangeInViewport(): Range;
/** /**
* Returns the ranges that are currently visible. * Returns the ranges that are currently visible.
* Does not account for horizontal scrolling. * Does not account for horizontal scrolling.
@ -4090,8 +4127,10 @@ declare namespace monaco.languages {
export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable; export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable;
/** /**
* Register a folding provider * Register a folding range provider
*/ */
export function registerFoldingRangeProvider(languageId: string, provider: FoldingRangeProvider): IDisposable;
/** /**
* Contains additional diagnostic information about the context in which * Contains additional diagnostic information about the context in which
* a [code action](#CodeActionProvider.provideCodeActions) is run. * a [code action](#CodeActionProvider.provideCodeActions) is run.
@ -4541,7 +4580,7 @@ declare namespace monaco.languages {
* editor will use the range at the current position or the * editor will use the range at the current position or the
* current position itself. * current position itself.
*/ */
range: IRange; range?: IRange;
} }
/** /**
@ -4985,6 +5024,60 @@ declare namespace monaco.languages {
provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): IColorPresentation[] | Thenable<IColorPresentation[]>; provideColorPresentations(model: editor.ITextModel, colorInfo: IColorInformation, token: CancellationToken): IColorPresentation[] | Thenable<IColorPresentation[]>;
} }
export interface FoldingContext {
}
/**
* A provider of colors for editor models.
*/
export interface FoldingRangeProvider {
/**
* Provides the color ranges for a specific model.
*/
provideFoldingRanges(model: editor.ITextModel, context: FoldingContext, token: CancellationToken): FoldingRange[] | Thenable<FoldingRange[]>;
}
export interface FoldingRange {
/**
* The zero-based start line of the range to fold. The folded area starts after the line's last character.
*/
start: number;
/**
* The zero-based end line of the range to fold. The folded area ends with the line's last character.
*/
end: number;
/**
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
* like 'Fold all comments'. See
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
*/
kind?: FoldingRangeKind;
}
export class FoldingRangeKind {
value: string;
/**
* Kind for folding range representing a comment. The value of the kind is 'comment'.
*/
static readonly Comment: FoldingRangeKind;
/**
* Kind for folding range representing a import. The value of the kind is 'imports'.
*/
static readonly Imports: FoldingRangeKind;
/**
* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).
* The value of the kind is 'region'.
*/
static readonly Region: FoldingRangeKind;
/**
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
*
* @param value of the kind.
*/
constructor(value: string);
}
export interface ResourceFileEdit { export interface ResourceFileEdit {
oldUri: Uri; oldUri: Uri;
newUri: Uri; newUri: Uri;
@ -5001,9 +5094,14 @@ declare namespace monaco.languages {
rejectReason?: string; rejectReason?: string;
} }
export interface RenameLocation {
range: IRange;
text: string;
}
export interface RenameProvider { export interface RenameProvider {
provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): WorkspaceEdit | Thenable<WorkspaceEdit>; provideRenameEdits(model: editor.ITextModel, position: Position, newName: string, token: CancellationToken): WorkspaceEdit | Thenable<WorkspaceEdit>;
resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): IRange | Thenable<IRange>; resolveRenameLocation?(model: editor.ITextModel, position: Position, token: CancellationToken): RenameLocation | Thenable<RenameLocation>;
} }
export interface Command { export interface Command {