|
@@ -1356,6 +1356,44 @@ declare namespace monaco.editor {
|
|
|
id: string;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * A single edit operation, that acts as a simple replace.
|
|
|
+ * i.e. Replace text at `range` with `text` in model.
|
|
|
+ */
|
|
|
+ export interface ISingleEditOperation {
|
|
|
+ /**
|
|
|
+ * The range to replace. This can be empty to emulate a simple insert.
|
|
|
+ */
|
|
|
+ range: IRange;
|
|
|
+ /**
|
|
|
+ * The text to replace with. This can be null to emulate a simple delete.
|
|
|
+ */
|
|
|
+ text: string | null;
|
|
|
+ /**
|
|
|
+ * This indicates that this operation has "insert" semantics.
|
|
|
+ * i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
|
|
|
+ */
|
|
|
+ forceMoveMarkers?: boolean;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Word inside a model.
|
|
|
+ */
|
|
|
+ export interface IWordAtPosition {
|
|
|
+ /**
|
|
|
+ * The word.
|
|
|
+ */
|
|
|
+ readonly word: string;
|
|
|
+ /**
|
|
|
+ * The column where the word starts.
|
|
|
+ */
|
|
|
+ readonly startColumn: number;
|
|
|
+ /**
|
|
|
+ * The column where the word ends.
|
|
|
+ */
|
|
|
+ readonly endColumn: number;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Vertical Lane in the overview ruler of the editor.
|
|
|
*/
|
|
@@ -1511,6 +1549,18 @@ declare namespace monaco.editor {
|
|
|
* The data can be read when injected texts at a given position are queried.
|
|
|
*/
|
|
|
readonly attachedData?: unknown;
|
|
|
+ /**
|
|
|
+ * Configures cursor stops around injected text.
|
|
|
+ * Defaults to {@link InjectedTextCursorStops.Both}.
|
|
|
+ */
|
|
|
+ readonly cursorStops?: InjectedTextCursorStops | null;
|
|
|
+ }
|
|
|
+
|
|
|
+ export enum InjectedTextCursorStops {
|
|
|
+ Both = 0,
|
|
|
+ Right = 1,
|
|
|
+ Left = 2,
|
|
|
+ None = 3
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1549,24 +1599,6 @@ declare namespace monaco.editor {
|
|
|
readonly options: IModelDecorationOptions;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Word inside a model.
|
|
|
- */
|
|
|
- export interface IWordAtPosition {
|
|
|
- /**
|
|
|
- * The word.
|
|
|
- */
|
|
|
- readonly word: string;
|
|
|
- /**
|
|
|
- * The column where the word starts.
|
|
|
- */
|
|
|
- readonly startColumn: number;
|
|
|
- /**
|
|
|
- * The column where the word ends.
|
|
|
- */
|
|
|
- readonly endColumn: number;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* End of line character preference.
|
|
|
*/
|
|
@@ -1613,26 +1645,6 @@ declare namespace monaco.editor {
|
|
|
CRLF = 1
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * A single edit operation, that acts as a simple replace.
|
|
|
- * i.e. Replace text at `range` with `text` in model.
|
|
|
- */
|
|
|
- export interface ISingleEditOperation {
|
|
|
- /**
|
|
|
- * The range to replace. This can be empty to emulate a simple insert.
|
|
|
- */
|
|
|
- range: IRange;
|
|
|
- /**
|
|
|
- * The text to replace with. This can be null to emulate a simple delete.
|
|
|
- */
|
|
|
- text: string | null;
|
|
|
- /**
|
|
|
- * This indicates that this operation has "insert" semantics.
|
|
|
- * i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
|
|
|
- */
|
|
|
- forceMoveMarkers?: boolean;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* A single edit operation, that has an identifier.
|
|
|
*/
|
|
@@ -2082,6 +2094,37 @@ declare namespace monaco.editor {
|
|
|
isAttachedToEditor(): boolean;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * A change
|
|
|
+ */
|
|
|
+ export interface IChange {
|
|
|
+ readonly originalStartLineNumber: number;
|
|
|
+ readonly originalEndLineNumber: number;
|
|
|
+ readonly modifiedStartLineNumber: number;
|
|
|
+ readonly modifiedEndLineNumber: number;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * A character level change.
|
|
|
+ */
|
|
|
+ export interface ICharChange extends IChange {
|
|
|
+ readonly originalStartColumn: number;
|
|
|
+ readonly originalEndColumn: number;
|
|
|
+ readonly modifiedStartColumn: number;
|
|
|
+ readonly modifiedEndColumn: number;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * A line change
|
|
|
+ */
|
|
|
+ export interface ILineChange extends IChange {
|
|
|
+ readonly charChanges: ICharChange[] | undefined;
|
|
|
+ }
|
|
|
+ export interface IDimension {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* A builder and helper for edit operations for a command.
|
|
|
*/
|
|
@@ -2174,38 +2217,6 @@ declare namespace monaco.editor {
|
|
|
readonly newModelUrl: Uri | null;
|
|
|
}
|
|
|
|
|
|
- export interface IDimension {
|
|
|
- width: number;
|
|
|
- height: number;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * A change
|
|
|
- */
|
|
|
- export interface IChange {
|
|
|
- readonly originalStartLineNumber: number;
|
|
|
- readonly originalEndLineNumber: number;
|
|
|
- readonly modifiedStartLineNumber: number;
|
|
|
- readonly modifiedEndLineNumber: number;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * A character level change.
|
|
|
- */
|
|
|
- export interface ICharChange extends IChange {
|
|
|
- readonly originalStartColumn: number;
|
|
|
- readonly originalEndColumn: number;
|
|
|
- readonly modifiedStartColumn: number;
|
|
|
- readonly modifiedEndColumn: number;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * A line change
|
|
|
- */
|
|
|
- export interface ILineChange extends IChange {
|
|
|
- readonly charChanges: ICharChange[] | undefined;
|
|
|
- }
|
|
|
-
|
|
|
export interface IContentSizeChangedEvent {
|
|
|
readonly contentWidth: number;
|
|
|
readonly contentHeight: number;
|
|
@@ -3220,6 +3231,11 @@ declare namespace monaco.editor {
|
|
|
* Defaults to true.
|
|
|
*/
|
|
|
foldingImportsByDefault?: boolean;
|
|
|
+ /**
|
|
|
+ * Maximum number of foldable regions.
|
|
|
+ * Defaults to 5000.
|
|
|
+ */
|
|
|
+ foldingMaximumRegions?: number;
|
|
|
/**
|
|
|
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
|
|
|
* Defaults to 'mouseover'.
|
|
@@ -4185,97 +4201,98 @@ declare namespace monaco.editor {
|
|
|
foldingStrategy = 38,
|
|
|
foldingHighlight = 39,
|
|
|
foldingImportsByDefault = 40,
|
|
|
- unfoldOnClickAfterEndOfLine = 41,
|
|
|
- fontFamily = 42,
|
|
|
- fontInfo = 43,
|
|
|
- fontLigatures = 44,
|
|
|
- fontSize = 45,
|
|
|
- fontWeight = 46,
|
|
|
- formatOnPaste = 47,
|
|
|
- formatOnType = 48,
|
|
|
- glyphMargin = 49,
|
|
|
- gotoLocation = 50,
|
|
|
- hideCursorInOverviewRuler = 51,
|
|
|
- hover = 52,
|
|
|
- inDiffEditor = 53,
|
|
|
- inlineSuggest = 54,
|
|
|
- letterSpacing = 55,
|
|
|
- lightbulb = 56,
|
|
|
- lineDecorationsWidth = 57,
|
|
|
- lineHeight = 58,
|
|
|
- lineNumbers = 59,
|
|
|
- lineNumbersMinChars = 60,
|
|
|
- linkedEditing = 61,
|
|
|
- links = 62,
|
|
|
- matchBrackets = 63,
|
|
|
- minimap = 64,
|
|
|
- mouseStyle = 65,
|
|
|
- mouseWheelScrollSensitivity = 66,
|
|
|
- mouseWheelZoom = 67,
|
|
|
- multiCursorMergeOverlapping = 68,
|
|
|
- multiCursorModifier = 69,
|
|
|
- multiCursorPaste = 70,
|
|
|
- occurrencesHighlight = 71,
|
|
|
- overviewRulerBorder = 72,
|
|
|
- overviewRulerLanes = 73,
|
|
|
- padding = 74,
|
|
|
- parameterHints = 75,
|
|
|
- peekWidgetDefaultFocus = 76,
|
|
|
- definitionLinkOpensInPeek = 77,
|
|
|
- quickSuggestions = 78,
|
|
|
- quickSuggestionsDelay = 79,
|
|
|
- readOnly = 80,
|
|
|
- renameOnType = 81,
|
|
|
- renderControlCharacters = 82,
|
|
|
- renderFinalNewline = 83,
|
|
|
- renderLineHighlight = 84,
|
|
|
- renderLineHighlightOnlyWhenFocus = 85,
|
|
|
- renderValidationDecorations = 86,
|
|
|
- renderWhitespace = 87,
|
|
|
- revealHorizontalRightPadding = 88,
|
|
|
- roundedSelection = 89,
|
|
|
- rulers = 90,
|
|
|
- scrollbar = 91,
|
|
|
- scrollBeyondLastColumn = 92,
|
|
|
- scrollBeyondLastLine = 93,
|
|
|
- scrollPredominantAxis = 94,
|
|
|
- selectionClipboard = 95,
|
|
|
- selectionHighlight = 96,
|
|
|
- selectOnLineNumbers = 97,
|
|
|
- showFoldingControls = 98,
|
|
|
- showUnused = 99,
|
|
|
- snippetSuggestions = 100,
|
|
|
- smartSelect = 101,
|
|
|
- smoothScrolling = 102,
|
|
|
- stickyTabStops = 103,
|
|
|
- stopRenderingLineAfter = 104,
|
|
|
- suggest = 105,
|
|
|
- suggestFontSize = 106,
|
|
|
- suggestLineHeight = 107,
|
|
|
- suggestOnTriggerCharacters = 108,
|
|
|
- suggestSelection = 109,
|
|
|
- tabCompletion = 110,
|
|
|
- tabIndex = 111,
|
|
|
- unicodeHighlighting = 112,
|
|
|
- unusualLineTerminators = 113,
|
|
|
- useShadowDOM = 114,
|
|
|
- useTabStops = 115,
|
|
|
- wordSeparators = 116,
|
|
|
- wordWrap = 117,
|
|
|
- wordWrapBreakAfterCharacters = 118,
|
|
|
- wordWrapBreakBeforeCharacters = 119,
|
|
|
- wordWrapColumn = 120,
|
|
|
- wordWrapOverride1 = 121,
|
|
|
- wordWrapOverride2 = 122,
|
|
|
- wrappingIndent = 123,
|
|
|
- wrappingStrategy = 124,
|
|
|
- showDeprecated = 125,
|
|
|
- inlayHints = 126,
|
|
|
- editorClassName = 127,
|
|
|
- pixelRatio = 128,
|
|
|
- tabFocusMode = 129,
|
|
|
- layoutInfo = 130,
|
|
|
- wrappingInfo = 131
|
|
|
+ foldingMaximumRegions = 41,
|
|
|
+ unfoldOnClickAfterEndOfLine = 42,
|
|
|
+ fontFamily = 43,
|
|
|
+ fontInfo = 44,
|
|
|
+ fontLigatures = 45,
|
|
|
+ fontSize = 46,
|
|
|
+ fontWeight = 47,
|
|
|
+ formatOnPaste = 48,
|
|
|
+ formatOnType = 49,
|
|
|
+ glyphMargin = 50,
|
|
|
+ gotoLocation = 51,
|
|
|
+ hideCursorInOverviewRuler = 52,
|
|
|
+ hover = 53,
|
|
|
+ inDiffEditor = 54,
|
|
|
+ inlineSuggest = 55,
|
|
|
+ letterSpacing = 56,
|
|
|
+ lightbulb = 57,
|
|
|
+ lineDecorationsWidth = 58,
|
|
|
+ lineHeight = 59,
|
|
|
+ lineNumbers = 60,
|
|
|
+ lineNumbersMinChars = 61,
|
|
|
+ linkedEditing = 62,
|
|
|
+ links = 63,
|
|
|
+ matchBrackets = 64,
|
|
|
+ minimap = 65,
|
|
|
+ mouseStyle = 66,
|
|
|
+ mouseWheelScrollSensitivity = 67,
|
|
|
+ mouseWheelZoom = 68,
|
|
|
+ multiCursorMergeOverlapping = 69,
|
|
|
+ multiCursorModifier = 70,
|
|
|
+ multiCursorPaste = 71,
|
|
|
+ occurrencesHighlight = 72,
|
|
|
+ overviewRulerBorder = 73,
|
|
|
+ overviewRulerLanes = 74,
|
|
|
+ padding = 75,
|
|
|
+ parameterHints = 76,
|
|
|
+ peekWidgetDefaultFocus = 77,
|
|
|
+ definitionLinkOpensInPeek = 78,
|
|
|
+ quickSuggestions = 79,
|
|
|
+ quickSuggestionsDelay = 80,
|
|
|
+ readOnly = 81,
|
|
|
+ renameOnType = 82,
|
|
|
+ renderControlCharacters = 83,
|
|
|
+ renderFinalNewline = 84,
|
|
|
+ renderLineHighlight = 85,
|
|
|
+ renderLineHighlightOnlyWhenFocus = 86,
|
|
|
+ renderValidationDecorations = 87,
|
|
|
+ renderWhitespace = 88,
|
|
|
+ revealHorizontalRightPadding = 89,
|
|
|
+ roundedSelection = 90,
|
|
|
+ rulers = 91,
|
|
|
+ scrollbar = 92,
|
|
|
+ scrollBeyondLastColumn = 93,
|
|
|
+ scrollBeyondLastLine = 94,
|
|
|
+ scrollPredominantAxis = 95,
|
|
|
+ selectionClipboard = 96,
|
|
|
+ selectionHighlight = 97,
|
|
|
+ selectOnLineNumbers = 98,
|
|
|
+ showFoldingControls = 99,
|
|
|
+ showUnused = 100,
|
|
|
+ snippetSuggestions = 101,
|
|
|
+ smartSelect = 102,
|
|
|
+ smoothScrolling = 103,
|
|
|
+ stickyTabStops = 104,
|
|
|
+ stopRenderingLineAfter = 105,
|
|
|
+ suggest = 106,
|
|
|
+ suggestFontSize = 107,
|
|
|
+ suggestLineHeight = 108,
|
|
|
+ suggestOnTriggerCharacters = 109,
|
|
|
+ suggestSelection = 110,
|
|
|
+ tabCompletion = 111,
|
|
|
+ tabIndex = 112,
|
|
|
+ unicodeHighlighting = 113,
|
|
|
+ unusualLineTerminators = 114,
|
|
|
+ useShadowDOM = 115,
|
|
|
+ useTabStops = 116,
|
|
|
+ wordSeparators = 117,
|
|
|
+ wordWrap = 118,
|
|
|
+ wordWrapBreakAfterCharacters = 119,
|
|
|
+ wordWrapBreakBeforeCharacters = 120,
|
|
|
+ wordWrapColumn = 121,
|
|
|
+ wordWrapOverride1 = 122,
|
|
|
+ wordWrapOverride2 = 123,
|
|
|
+ wrappingIndent = 124,
|
|
|
+ wrappingStrategy = 125,
|
|
|
+ showDeprecated = 126,
|
|
|
+ inlayHints = 127,
|
|
|
+ editorClassName = 128,
|
|
|
+ pixelRatio = 129,
|
|
|
+ tabFocusMode = 130,
|
|
|
+ layoutInfo = 131,
|
|
|
+ wrappingInfo = 132
|
|
|
}
|
|
|
|
|
|
export const EditorOptions: {
|
|
@@ -4321,6 +4338,7 @@ declare namespace monaco.editor {
|
|
|
foldingStrategy: IEditorOption<EditorOption.foldingStrategy, 'auto' | 'indentation'>;
|
|
|
foldingHighlight: IEditorOption<EditorOption.foldingHighlight, boolean>;
|
|
|
foldingImportsByDefault: IEditorOption<EditorOption.foldingImportsByDefault, boolean>;
|
|
|
+ foldingMaximumRegions: IEditorOption<EditorOption.foldingMaximumRegions, number>;
|
|
|
unfoldOnClickAfterEndOfLine: IEditorOption<EditorOption.unfoldOnClickAfterEndOfLine, boolean>;
|
|
|
fontFamily: IEditorOption<EditorOption.fontFamily, string>;
|
|
|
fontInfo: IEditorOption<EditorOption.fontInfo, FontInfo>;
|
|
@@ -4423,6 +4441,18 @@ declare namespace monaco.editor {
|
|
|
|
|
|
export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;
|
|
|
|
|
|
+ export interface IEditorConstructionOptions extends IEditorOptions {
|
|
|
+ /**
|
|
|
+ * The initial editor dimension (to avoid measuring the container).
|
|
|
+ */
|
|
|
+ dimension?: IDimension;
|
|
|
+ /**
|
|
|
+ * Place overflow widgets inside an external DOM node.
|
|
|
+ * Defaults to an internal DOM node.
|
|
|
+ */
|
|
|
+ overflowWidgetsDomNode?: HTMLElement;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* A view zone is a full horizontal rectangle that 'pushes' text down.
|
|
|
* The editor reserves space for view zones when rendering.
|
|
@@ -4823,18 +4853,6 @@ declare namespace monaco.editor {
|
|
|
readonly languageId: string | null;
|
|
|
}
|
|
|
|
|
|
- export interface IEditorConstructionOptions extends IEditorOptions {
|
|
|
- /**
|
|
|
- * The initial editor dimension (to avoid measuring the container).
|
|
|
- */
|
|
|
- dimension?: IDimension;
|
|
|
- /**
|
|
|
- * Place overflow widgets inside an external DOM node.
|
|
|
- * Defaults to an internal DOM node.
|
|
|
- */
|
|
|
- overflowWidgetsDomNode?: HTMLElement;
|
|
|
- }
|
|
|
-
|
|
|
export interface IDiffEditorConstructionOptions extends IDiffEditorOptions {
|
|
|
/**
|
|
|
* The initial editor dimension (to avoid measuring the container).
|
|
@@ -5320,7 +5338,6 @@ declare namespace monaco.editor {
|
|
|
|
|
|
export class BareFontInfo {
|
|
|
readonly _bareFontInfoBrand: void;
|
|
|
- readonly zoomLevel: number;
|
|
|
readonly pixelRatio: number;
|
|
|
readonly fontFamily: string;
|
|
|
readonly fontWeight: string;
|
|
@@ -6851,8 +6868,9 @@ declare namespace monaco.languages {
|
|
|
|
|
|
export interface InlayHintLabelPart {
|
|
|
label: string;
|
|
|
- collapsible?: boolean;
|
|
|
- action?: Command | Location;
|
|
|
+ tooltip?: string | IMarkdownString;
|
|
|
+ command?: Command;
|
|
|
+ location?: Location;
|
|
|
}
|
|
|
|
|
|
export interface InlayHint {
|
|
@@ -6860,8 +6878,8 @@ declare namespace monaco.languages {
|
|
|
tooltip?: string | IMarkdownString;
|
|
|
position: IPosition;
|
|
|
kind: InlayHintKind;
|
|
|
- whitespaceBefore?: boolean;
|
|
|
- whitespaceAfter?: boolean;
|
|
|
+ paddingLeft?: boolean;
|
|
|
+ paddingRight?: boolean;
|
|
|
}
|
|
|
|
|
|
export interface InlayHintList {
|