@ -429,7 +429,7 @@ declare namespace monaco {
export interface IMarkdownString {
readonly value: string;
readonly isTrusted?: boolean;
readonly isTrusted?: boolean | MarkdownStringTrustedOptions ;
readonly supportThemeIcons?: boolean;
readonly supportHtml?: boolean;
readonly baseUri?: UriComponents;
@ -438,6 +438,10 @@ declare namespace monaco {
};
}
export interface MarkdownStringTrustedOptions {
readonly enabledCommands: readonly string[];
}
export interface IKeyboardEvent {
readonly _standardKeyboardEventBrand: true;
readonly browserEvent: KeyboardEvent;
@ -446,6 +450,7 @@ declare namespace monaco {
readonly shiftKey: boolean;
readonly altKey: boolean;
readonly metaKey: boolean;
readonly altGraphKey: boolean;
readonly keyCode: KeyCode;
readonly code: string;
equals(keybinding: number): boolean;
@ -668,11 +673,11 @@ declare namespace monaco {
/**
* Test if this range equals other.
*/
equalsRange(other: IRange | null): boolean;
equalsRange(other: IRange | null | undefined ): boolean;
/**
* Test if range `a` equals `b`.
*/
static equalsRange(a: IRange | null, b: IRange | null): boolean;
static equalsRange(a: IRange | null | undefined , b: IRange | null | undefined ): boolean;
/**
* Return the end position (which will be after or equal to the start position)
*/
@ -705,14 +710,22 @@ declare namespace monaco {
* Create a new empty range using this range's start position.
*/
collapseToStart(): Range;
/**
* Moves the range by the given amount of lines.
*/
delta(lineCount: number): Range;
/**
* Create a new empty range using this range's start position.
*/
static collapseToStart(range: IRange): Range;
/**
* Create a new empty range using this range's end position.
*/
collapseToEnd(): Range;
/**
* Create a new empty range using this range's end position.
*/
static collapseToEnd(range: IRange): Range;
/**
* Moves the range by the given amount of lines.
*/
delta(lineCount: number): Range;
static fromPositions(start: IPosition, end?: IPosition): Range;
/**
* Create a `Range` from an `IRange`.
@ -983,7 +996,7 @@ declare namespace monaco.editor {
/**
* Change the language for a model.
*/
export function setModelLanguage(model: ITextModel, l anguageId: string): void;
export function setModelLanguage(model: ITextModel, mimeTypeOrL anguageId: string): void;
/**
* Set the markers for a model.
@ -1248,7 +1261,7 @@ declare namespace monaco.editor {
*/
'semanticHighlighting.enabled'?: true | false | 'configuredByTheme';
/**
* Keep peek editors open even when double clicking their content or when hitting `Escape`.
* Keep peek editors open even when double- clicking their content or when hitting `Escape`.
* Defaults to false.
*/
stablePeek?: boolean;
@ -1380,6 +1393,7 @@ declare namespace monaco.editor {
startColumn: number;
endLineNumber: number;
endColumn: number;
modelVersionId?: number;
relatedInformation?: IRelatedInformation[];
tags?: MarkerTag[];
}
@ -1399,6 +1413,7 @@ declare namespace monaco.editor {
startColumn: number;
endLineNumber: number;
endColumn: number;
modelVersionId?: number;
relatedInformation?: IRelatedInformation[];
tags?: MarkerTag[];
}
@ -1768,6 +1783,7 @@ declare namespace monaco.editor {
readonly defaultEOL: DefaultEndOfLine;
readonly trimAutoWhitespace: boolean;
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
get originalIndentSize(): number | 'tabSize';
}
export interface BracketPairColorizationOptions {
@ -1777,7 +1793,7 @@ declare namespace monaco.editor {
export interface ITextModelUpdateOptions {
tabSize?: number;
indentSize?: number;
indentSize?: number | 'tabSize' ;
insertSpaces?: boolean;
trimAutoWhitespace?: boolean;
bracketColorizationOptions?: BracketPairColorizationOptions;
@ -1870,12 +1886,12 @@ declare namespace monaco.editor {
* @param range The range describing what text length to get.
* @return The text length.
*/
getValueLengthInRange(range: IRange): number;
getValueLengthInRange(range: IRange, eol?: EndOfLinePreference ): number;
/**
* Get the character count of text in a certain range.
* @param range The range describing what text length to get.
*/
getCharacterCountInRange(range: IRange): number;
getCharacterCountInRange(range: IRange, eol?: EndOfLinePreference ): number;
/**
* Get the number of lines in the model.
*/
@ -2234,6 +2250,124 @@ declare namespace monaco.editor {
export interface ILineChange extends IChange {
readonly charChanges: ICharChange[] | undefined;
}
/**
* A document diff provider computes the diff between two text models.
*/
export interface IDocumentDiffProvider {
/**
* Computes the diff between the text models `original` and `modified`.
*/
computeDiff(original: ITextModel, modified: ITextModel, options: IDocumentDiffProviderOptions): Promise<IDocumentDiff>;
/**
* Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.
* Any user of this provider should recompute the diff when this event is fired.
*/
onDidChange: IEvent<void>;
}
/**
* Options for the diff computation.
*/
export interface IDocumentDiffProviderOptions {
/**
* When set to true, the diff should ignore whitespace changes.i
*/
ignoreTrimWhitespace: boolean;
/**
* A diff computation should throw if it takes longer than this value.
*/
maxComputationTimeMs: number;
}
/**
* Represents a diff between two text models.
*/
export interface IDocumentDiff {
/**
* If true, both text models are identical (byte-wise).
*/
readonly identical: boolean;
/**
* If true, the diff computation timed out and the diff might not be accurate.
*/
readonly quitEarly: boolean;
/**
* Maps all modified line ranges in the original to the corresponding line ranges in the modified text model.
*/
readonly changes: LineRangeMapping[];
}
/**
* Maps a line range in the original text model to a line range in the modified text model.
*/
export class LineRangeMapping {
/**
* The line range in the original text model.
*/
readonly originalRange: LineRange;
/**
* The line range in the modified text model.
*/
readonly modifiedRange: LineRange;
/**
* If inner changes have not been computed, this is set to undefined.
* Otherwise, it represents the character-level diff in this line range.
* The original range of each range mapping should be contained in the original line range (same for modified).
* Must not be an empty array.
*/
readonly innerChanges: RangeMapping[] | undefined;
constructor(originalRange: LineRange, modifiedRange: LineRange, innerChanges: RangeMapping[] | undefined);
toString(): string;
}
/**
* A range of lines (1-based).
*/
export class LineRange {
/**
* The start line number.
*/
readonly startLineNumber: number;
/**
* The end line number (exclusive).
*/
readonly endLineNumberExclusive: number;
constructor(startLineNumber: number, endLineNumberExclusive: number);
/**
* Indicates if this line range is empty.
*/
get isEmpty(): boolean;
/**
* Moves this line range by the given offset of line numbers.
*/
delta(offset: number): LineRange;
/**
* The number of lines this line range spans.
*/
get length(): number;
/**
* Creates a line range that combines this and the given line range.
*/
join(other: LineRange): LineRange;
toString(): string;
}
/**
* Maps a range in the original text model to a range in the modified text model.
*/
export class RangeMapping {
/**
* The original range.
*/
readonly originalRange: Range;
/**
* The modified range.
*/
readonly modifiedRange: Range;
constructor(originalRange: Range, modifiedRange: Range);
toString(): string;
}
export interface IDimension {
width: number;
height: number;
@ -2939,9 +3073,9 @@ declare namespace monaco.editor {
cursorSurroundingLinesStyle?: 'default' | 'all';
/**
* Render last line number when the file ends with a newline.
* Defaults to true .
* Defaults to 'on' for Windows and macOS and 'dimmed' for Linux .
*/
renderFinalNewline?: boolean ;
renderFinalNewline?: 'on' | 'off' | 'dimmed' ;
/**
* Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
* Defaults to 'prompt'.
@ -3056,9 +3190,9 @@ declare namespace monaco.editor {
mouseStyle?: 'text' | 'default' | 'copy';
/**
* Enable smooth caret animation.
* Defaults to false .
* Defaults to 'off' .
*/
cursorSmoothCaretAnimation?: boolean ;
cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on' ;
/**
* Control the cursor style, either 'block' or 'line'.
* Defaults to 'line'.
@ -3073,6 +3207,11 @@ declare namespace monaco.editor {
* Defaults to false.
*/
fontLigatures?: boolean | string;
/**
* Enable font variations.
* Defaults to false.
*/
fontVariations?: boolean | string;
/**
* Disable the use of `transform: translate3d(0px, 0px, 0px)` for the editor margin and lines layers.
* The usage of `transform: translate3d(0px, 0px, 0px)` acts as a hint for browsers to create an extra layer.
@ -3153,6 +3292,12 @@ declare namespace monaco.editor {
* Configure word wrapping characters. A break will be introduced after these characters.
*/
wordWrapBreakAfterCharacters?: string;
/**
* Sets whether line breaks appear wherever the text would otherwise overflow its content box.
* When wordBreak = 'normal', Use the default line break rule.
* When wordBreak = 'keepAll', Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.
*/
wordBreak?: 'normal' | 'keepAll';
/**
* Performance guard: Stop rendering a line after x characters.
* Defaults to 10000.
@ -3172,6 +3317,10 @@ declare namespace monaco.editor {
* Enable inline color decorators and color picker rendering.
*/
colorDecorators?: boolean;
/**
* Controls the max number of color decorators that can be rendered in an editor at once.
*/
colorDecoratorsLimit?: number;
/**
* Control the behaviour of comments in the editor.
*/
@ -3216,6 +3365,10 @@ declare namespace monaco.editor {
* Defaults to 'spread'.
*/
multiCursorPaste?: 'spread' | 'full';
/**
* Controls the max number of text cursors that can be in an active editor at once.
*/
multiCursorLimit?: number;
/**
* Configure the editor's accessibility support.
* Defaults to 'auto'. It is best to leave this to 'auto'.
@ -3420,6 +3573,11 @@ declare namespace monaco.editor {
* Defaults to 'always'.
*/
matchBrackets?: 'never' | 'near' | 'always';
/**
* Enable experimental whitespace rendering.
* Defaults to 'svg'.
*/
experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';
/**
* Enable rendering of whitespace.
* Defaults to 'selection'.
@ -3573,7 +3731,7 @@ declare namespace monaco.editor {
/**
* Diff Algorithm
*/
diffAlgorithm?: 'smart' | 'experimental';
diffAlgorithm?: 'smart' | 'experimental' | IDocumentDiffProvider ;
}
/**
@ -3706,7 +3864,7 @@ declare namespace monaco.editor {
autoFindInSelection?: 'never' | 'always' | 'multiline';
addExtraSpaceOnTop?: boolean;
/**
* Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found
* Controls whether the search result and diff result automatically restarts from the beginning (or the end) when no further matches can be found
*/
loop?: boolean;
}
@ -4172,6 +4330,7 @@ declare namespace monaco.editor {
* Defaults to `prefix`.
*/
mode?: 'prefix' | 'subword' | 'subwordSmart';
showToolbar?: 'always' | 'onHover';
}
export interface IBracketPairColorizationOptions {
@ -4237,6 +4396,10 @@ declare namespace monaco.editor {
* Enable using global storage for remembering suggestions.
*/
shareSuggestSelections?: boolean;
/**
* Select suggestions when triggered via quick suggest or trigger characters
*/
selectionMode?: 'always' | 'never' | 'whenTriggerCharacter' | 'whenQuickSuggestion';
/**
* Enable or disable icons in suggestions. Defaults to true.
*/
@ -4438,123 +4601,128 @@ declare namespace monaco.editor {
codeLensFontFamily = 15,
codeLensFontSize = 16,
colorDecorators = 17,
columnSelection = 18,
comments = 19,
contextmenu = 20,
copyWithSyntaxHighlighting = 21,
cursorBlinking = 22,
cursorSmoothCaretAnimation = 23,
cursorStyle = 24,
cursorSurroundingLines = 25,
cursorSurroundingLinesStyle = 26,
cursorWidth = 27,
disableLayerHinting = 28,
disableMonospaceOptimizations = 29,
domReadOnly = 30,
dragAndDrop = 31,
dropIntoEditor = 32,
emptySelectionClipboard = 33,
extraEditorClassName = 34,
fastScrollSensitivity = 35,
find = 36,
fixedOverflowWidgets = 37,
folding = 38,
foldingStrategy = 39,
foldingHighlight = 40,
foldingImportsByDefault = 41,
foldingMaximumRegions = 42,
unfoldOnClickAfterEndOfLine = 43,
fontFamily = 44,
fontInfo = 45,
fontLigatures = 46,
fontSize = 47,
fontWeight = 48,
formatOnPaste = 49,
formatOnType = 50,
glyphMargin = 51,
gotoLocation = 52,
hideCursorInOverviewRuler = 53,
hover = 54,
inDiffEditor = 55,
inlineSuggest = 56,
letterSpacing = 57,
lightbulb = 58,
lineDecorationsWidth = 59,
lineHeight = 60,
lineNumbers = 61,
lineNumbersMinChars = 62,
linkedEditing = 63,
links = 64,
matchBrackets = 65,
minimap = 66,
mouseStyle = 67,
mouseWheelScrollSensitivity = 68,
mouseWheelZoom = 69,
multiCursorMergeOverlapping = 70,
multiCursorModifier = 71,
multiCursorPaste = 72,
occurrencesHighlight = 73,
overviewRulerBorder = 74,
overviewRulerLanes = 75,
padding = 76,
parameterHints = 77,
peekWidgetDefaultFocus = 78,
definitionLinkOpensInPeek = 79,
quickSuggestions = 80,
quickSuggestionsDelay = 81,
readOnly = 82,
renameOnType = 83,
renderControlCharacters = 84,
renderFinalNewline = 85,
renderLineHighlight = 86,
renderLineHighlightOnlyWhenFocus = 87,
renderValidationDecorations = 88,
renderWhitespace = 89,
revealHorizontalRightPadding = 90,
roundedSelection = 91,
rulers = 92,
scrollbar = 93,
scrollBeyondLastColumn = 94,
scrollBeyondLastLine = 95,
scrollPredominantAxis = 96,
selectionClipboard = 97,
selectionHighlight = 98,
selectOnLineNumbers = 99,
showFoldingControls = 100,
showUnused = 101,
snippetSuggestions = 102,
smartSelect = 103,
smoothScrolling = 104,
stickyScroll = 105,
stickyTabStops = 106,
stopRenderingLineAfter = 107,
suggest = 108,
suggestFontSize = 109,
suggestLineHeight = 110,
suggestOnTriggerCharacters = 111,
suggestSelection = 112,
tabCompletion = 113,
tabIndex = 114,
unicodeHighlighting = 115,
unusualLineTerminators = 116,
useShadowDOM = 117,
useTabStops = 118,
wordSeparators = 119,
wordWrap = 120,
wordWrapBreakAfterCharacters = 121,
wordWrapBreakBeforeCharacters = 122,
wordWrapColumn = 123,
wordWrapOverride1 = 124,
wordWrapOverride2 = 125,
wrappingIndent = 126,
wrappingStrategy = 127,
showDeprecated = 128,
inlayHints = 129,
editorClassName = 130,
pixelRatio = 131,
tabFocusMode = 132,
layoutInfo = 133,
wrappingInfo = 134
colorDecoratorsLimit = 18,
columnSelection = 19,
comments = 20,
contextmenu = 21,
copyWithSyntaxHighlighting = 22,
cursorBlinking = 23,
cursorSmoothCaretAnimation = 24,
cursorStyle = 25,
cursorSurroundingLines = 26,
cursorSurroundingLinesStyle = 27,
cursorWidth = 28,
disableLayerHinting = 29,
disableMonospaceOptimizations = 30,
domReadOnly = 31,
dragAndDrop = 32,
dropIntoEditor = 33,
emptySelectionClipboard = 34,
experimentalWhitespaceRendering = 35,
extraEditorClassName = 36,
fastScrollSensitivity = 37,
find = 38,
fixedOverflowWidgets = 39,
folding = 40,
foldingStrategy = 41,
foldingHighlight = 42,
foldingImportsByDefault = 43,
foldingMaximumRegions = 44,
unfoldOnClickAfterEndOfLine = 45,
fontFamily = 46,
fontInfo = 47,
fontLigatures = 48,
fontSize = 49,
fontWeight = 50,
fontVariations = 51,
formatOnPaste = 52,
formatOnType = 53,
glyphMargin = 54,
gotoLocation = 55,
hideCursorInOverviewRuler = 56,
hover = 57,
inDiffEditor = 58,
inlineSuggest = 59,
letterSpacing = 60,
lightbulb = 61,
lineDecorationsWidth = 62,
lineHeight = 63,
lineNumbers = 64,
lineNumbersMinChars = 65,
linkedEditing = 66,
links = 67,
matchBrackets = 68,
minimap = 69,
mouseStyle = 70,
mouseWheelScrollSensitivity = 71,
mouseWheelZoom = 72,
multiCursorMergeOverlapping = 73,
multiCursorModifier = 74,
multiCursorPaste = 75,
multiCursorLimit = 76,
occurrencesHighlight = 77,
overviewRulerBorder = 78,
overviewRulerLanes = 79,
padding = 80,
parameterHints = 81,
peekWidgetDefaultFocus = 82,
definitionLinkOpensInPeek = 83,
quickSuggestions = 84,
quickSuggestionsDelay = 85,
readOnly = 86,
renameOnType = 87,
renderControlCharacters = 88,
renderFinalNewline = 89,
renderLineHighlight = 90,
renderLineHighlightOnlyWhenFocus = 91,
renderValidationDecorations = 92,
renderWhitespace = 93,
revealHorizontalRightPadding = 94,
roundedSelection = 95,
rulers = 96,
scrollbar = 97,
scrollBeyondLastColumn = 98,
scrollBeyondLastLine = 99,
scrollPredominantAxis = 100,
selectionClipboard = 101,
selectionHighlight = 102,
selectOnLineNumbers = 103,
showFoldingControls = 104,
showUnused = 105,
snippetSuggestions = 106,
smartSelect = 107,
smoothScrolling = 108,
stickyScroll = 109,
stickyTabStops = 110,
stopRenderingLineAfter = 111,
suggest = 112,
suggestFontSize = 113,
suggestLineHeight = 114,
suggestOnTriggerCharacters = 115,
suggestSelection = 116,
tabCompletion = 117,
tabIndex = 118,
unicodeHighlighting = 119,
unusualLineTerminators = 120,
useShadowDOM = 121,
useTabStops = 122,
wordBreak = 123,
wordSeparators = 124,
wordWrap = 125,
wordWrapBreakAfterCharacters = 126,
wordWrapBreakBeforeCharacters = 127,
wordWrapColumn = 128,
wordWrapOverride1 = 129,
wordWrapOverride2 = 130,
wrappingIndent = 131,
wrappingStrategy = 132,
showDeprecated = 133,
inlayHints = 134,
editorClassName = 135,
pixelRatio = 136,
tabFocusMode = 137,
layoutInfo = 138,
wrappingInfo = 139
}
export const EditorOptions: {
@ -4577,12 +4745,13 @@ declare namespace monaco.editor {
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, boolean >;
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit' >;
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;
@ -4594,6 +4763,7 @@ declare namespace monaco.editor {
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
@ -4609,6 +4779,7 @@ declare namespace monaco.editor {
fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;
fontSize: IEditorOption<EditorOption.fontSize, number>;
fontWeight: IEditorOption<EditorOption.fontWeight, string>;
fontVariations: IEditorOption<EditorOption.fontVariations, string>;
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
@ -4618,7 +4789,7 @@ declare namespace monaco.editor {
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, string | number>;
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
lineHeight: IEditorOption<EditorOption.lineHeight, number>;
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;
@ -4632,6 +4803,7 @@ declare namespace monaco.editor {
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
@ -4644,7 +4816,7 @@ declare namespace monaco.editor {
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, boolean>;
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, boolean >;
renderFinalNewline: IEditorOption<EditorOption.renderFinalNewline, 'on' | 'off' | 'dimmed' >;
renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;
@ -4679,6 +4851,7 @@ declare namespace monaco.editor {
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
@ -4686,13 +4859,13 @@ declare namespace monaco.editor {
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, 'on' | 'off' | 'inherit'>;
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
editorClassName: IEditorOption<EditorOption.editorClassName, string>;
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
};
type EditorOptionsType = typeof EditorOptions;
@ -4828,10 +5001,11 @@ declare namespace monaco.editor {
*/
position: IPosition | null;
/**
* Optionally, a range can be provided to further
* define the position of the content widget.
* Optionally, a secondary position can be provided to further
* define the position of the content widget. The secondary position
* must have the same line number as the primary position.
*/
range?: IRange | null;
secondaryPosition?: IPosition | null;
/**
* Placement preference for position, in order of preference.
*/
@ -5463,6 +5637,10 @@ declare namespace monaco.editor {
* Get the vertical position (top offset) for the position w.r.t. to the first line.
*/
getTopForPosition(lineNumber: number, column: number): number;
/**
* Write the screen reader content to be the current selection
*/
writeScreenReaderContent(reason: string): void;
/**
* Returns the editor's container dom node
*/
@ -5632,6 +5810,7 @@ declare namespace monaco.editor {
readonly fontWeight: string;
readonly fontSize: number;
readonly fontFeatureSettings: string;
readonly fontVariationSettings: string;
readonly lineHeight: number;
readonly letterSpacing: number;
}
@ -6317,6 +6496,7 @@ declare namespace monaco.languages {
}
export enum CompletionItemInsertTextRule {
None = 0,
/**
* Adjust whitespace/indentation of multiline insert texts to
* match the current line indentation.
@ -7412,7 +7592,7 @@ declare namespace monaco.languages {
log?: string;
}
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | IShortMonarchLanguageAction[] | IExpandedMonarchLanguageAction[];
export type IMonarchLanguageAction = IShortMonarchLanguageAction | IExpandedMonarchLanguageAction | ( IShortMonarchLanguageAction | IExpandedMonarchLanguageAction) [];
/**
* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
@ -8138,6 +8318,60 @@ declare namespace monaco.languages.typescript {
writeByteOrderMark: boolean;
text: string;
}
export interface ModeConfiguration {
/**
* Defines whether the built-in completionItemProvider is enabled.
*/
readonly completionItems?: boolean;
/**
* Defines whether the built-in hoverProvider is enabled.
*/
readonly hovers?: boolean;
/**
* Defines whether the built-in documentSymbolProvider is enabled.
*/
readonly documentSymbols?: boolean;
/**
* Defines whether the built-in definitions provider is enabled.
*/
readonly definitions?: boolean;
/**
* Defines whether the built-in references provider is enabled.
*/
readonly references?: boolean;
/**
* Defines whether the built-in references provider is enabled.
*/
readonly documentHighlights?: boolean;
/**
* Defines whether the built-in rename provider is enabled.
*/
readonly rename?: boolean;
/**
* Defines whether the built-in diagnostic provider is enabled.
*/
readonly diagnostics?: boolean;
/**
* Defines whether the built-in document formatting range edit provider is enabled.
*/
readonly documentRangeFormattingEdits?: boolean;
/**
* Defines whether the built-in signature help provider is enabled.
*/
readonly signatureHelp?: boolean;
/**
* Defines whether the built-in onType formatting edit provider is enabled.
*/
readonly onTypeFormattingEdits?: boolean;
/**
* Defines whether the built-in code actions provider is enabled.
*/
readonly codeActions?: boolean;
/**
* Defines whether the built-in inlay hints provider is enabled.
*/
readonly inlayHints?: boolean;
}
export interface LanguageServiceDefaults {
/**
* Event fired when compiler options or diagnostics options are changed.
@ -8149,6 +8383,8 @@ declare namespace monaco.languages.typescript {
readonly onDidExtraLibsChange: IEvent<void>;
readonly workerOptions: WorkerOptions;
readonly inlayHintsOptions: InlayHintsOptions;
readonly modeConfiguration: ModeConfiguration;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
/**
* Get the current extra libs registered with the language service.
*/