Merge pull request #3532 from microsoft/hediet/fair-wren

Prepares 0.35.0 release
pull/3533/head
Henning Dieterichs 2 years ago committed by GitHub
commit 2b2dc65777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,9 +1,37 @@
# Monaco Editor Changelog # Monaco Editor Changelog
## [0.35.1] ## [0.35.0]
- Adds sticky scrolling - Adds sticky scrolling
- Support for custom diff algorithms
### Breaking Changes
- Renamed the option `enableDropIntoEditor` to `dropIntoEditor` - Renamed the option `enableDropIntoEditor` to `dropIntoEditor`
- Changed `IContentWidgetPosition.range: Range` to `IContentWidgetPosition.secondaryPosition: Position`
- `renderFinalNewline` config: is now of type `'on' | 'off' | 'dimmed'` (was `boolean`).
- `cursorSmoothCaretAnimation` config: is now of type `'off' | 'explicit' | 'on'` (was `boolean`)
Contributions to `monaco-editor`:
- [@andrewimcclement](https://github.com/andrewimcclement): Add .props & .targets as XML extensions [PR #3510](https://github.com/microsoft/monaco-editor/pull/3510)
- [@DetachHead](https://github.com/DetachHead): add `satisfies` keyword to typescript [PR #3337](https://github.com/microsoft/monaco-editor/pull/3337)
- [@jeremy-rifkin (Jeremy Rifkin)](https://github.com/jeremy-rifkin): Add AVX 512 types to C++ syntax highlighting [PR #3286](https://github.com/microsoft/monaco-editor/pull/3286)
- [@joecarl (José Carlos)](https://github.com/joecarl): Add setModeConfiguration for monaco.languages.typescript.[typescript|javascript]Defaults [PR #3489](https://github.com/microsoft/monaco-editor/pull/3489)
- [@jonatanklosko (Jonatan Kłosko)](https://github.com/jonatanklosko): Update Elixir tokenizer [PR #3453](https://github.com/microsoft/monaco-editor/pull/3453)
- [@JoyceZhu (Joyce Zhu)](https://github.com/JoyceZhu): Update import path for `browser-esm-webpack-small` [PR #3402](https://github.com/microsoft/monaco-editor/pull/3402)
- [@Jozebel11 (Joseph Hardwicke)](https://github.com/Jozebel11): Add position styling to playground container to equal 'relative' [PR #3446](https://github.com/microsoft/monaco-editor/pull/3446)
- [@kirjs (Kirill Cherkashin)](https://github.com/kirjs): Fix broken link in the changelog [PR #3382](https://github.com/microsoft/monaco-editor/pull/3382)
- [@LeoDog896 (Tristan F.)](https://github.com/LeoDog896)
- Ignore dist from vite/parcel in prettier [PR #3466](https://github.com/microsoft/monaco-editor/pull/3466)
- Add .kts as a file extension [PR #3467](https://github.com/microsoft/monaco-editor/pull/3467)
- [@MasterOdin (Matthew Peveler)](https://github.com/MasterOdin): Add new pgsql 15 functions [PR #3363](https://github.com/microsoft/monaco-editor/pull/3363)
- [@mofux (Thomas Zilz)](https://github.com/mofux): Resolve URIs with special characters correctly [PR #3392](https://github.com/microsoft/monaco-editor/pull/3392)
- [@nnnnoel (Noel Kim (김민혁))](https://github.com/nnnnoel): fix(mysql/tokenizer): Fix single quoted string escape [PR #3232](https://github.com/microsoft/monaco-editor/pull/3232)
- [@rcjsuen (Remy Suen)](https://github.com/rcjsuen): Fix the color provider's columns [PR #3348](https://github.com/microsoft/monaco-editor/pull/3348)
- [@RubenRBS (Rubén Rincón Blanco)](https://github.com/RubenRBS): Recognize \0 as an escape sequence [PR #3443](https://github.com/microsoft/monaco-editor/pull/3443)
- [@sekedus (Sekedus)](https://github.com/sekedus): add homepage url [PR #3497](https://github.com/microsoft/monaco-editor/pull/3497)
- [@tr3ysmith (Trey Smith)](https://github.com/tr3ysmith): Fix possible duplicate of editors in vite sample [PR #3390](https://github.com/microsoft/monaco-editor/pull/3390)
## [0.34.1] ## [0.34.1]

18
package-lock.json generated

@ -1,12 +1,12 @@
{ {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.34.1", "version": "0.35.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.34.1", "version": "0.35.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
@ -23,7 +23,7 @@
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"mocha": "^9.2.0", "mocha": "^9.2.0",
"monaco-editor-core": "0.35.0-dev.20221208", "monaco-editor-core": "0.35.0-dev.20230127",
"parcel": "^2.7.0", "parcel": "^2.7.0",
"playwright": "^1.18.1", "playwright": "^1.18.1",
"prettier": "^2.5.1", "prettier": "^2.5.1",
@ -4519,9 +4519,9 @@
"dev": true "dev": true
}, },
"node_modules/monaco-editor-core": { "node_modules/monaco-editor-core": {
"version": "0.35.0-dev.20221208", "version": "0.35.0-dev.20230127",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221208.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20230127.tgz",
"integrity": "sha512-XQpKe+FoGoIWDqn/xiz5+Iyi1PrVWArlrBqqkQuWu4IBjUvs7/krZLqnsy/Vfoflu9Ldtoc1JU9wNu0tyDv66A==", "integrity": "sha512-C1PCdu36/atbot/xFdm3YUg20JonlJ7whkxSue8jAdwlQrcHoGKgAp1j2XHSi9X2yMz/CDAwkhNiXnpVrAjvwQ==",
"dev": true "dev": true
}, },
"node_modules/mri": { "node_modules/mri": {
@ -9999,9 +9999,9 @@
} }
}, },
"monaco-editor-core": { "monaco-editor-core": {
"version": "0.35.0-dev.20221208", "version": "0.35.0-dev.20230127",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20221208.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.35.0-dev.20230127.tgz",
"integrity": "sha512-XQpKe+FoGoIWDqn/xiz5+Iyi1PrVWArlrBqqkQuWu4IBjUvs7/krZLqnsy/Vfoflu9Ldtoc1JU9wNu0tyDv66A==", "integrity": "sha512-C1PCdu36/atbot/xFdm3YUg20JonlJ7whkxSue8jAdwlQrcHoGKgAp1j2XHSi9X2yMz/CDAwkhNiXnpVrAjvwQ==",
"dev": true "dev": true
}, },
"mri": { "mri": {

@ -1,7 +1,7 @@
{ {
"name": "monaco-editor", "name": "monaco-editor",
"version": "0.34.1", "version": "0.35.0",
"vscodeRef": "0316a754aa4c25208bef91937efbce2ab1e3ce37", "vscodeRef": "d374739638b8094ecc2756d5f4bc18bc47f5d17b",
"private": true, "private": true,
"description": "A browser based code editor", "description": "A browser based code editor",
"homepage": "https://github.com/microsoft/monaco-editor", "homepage": "https://github.com/microsoft/monaco-editor",
@ -50,7 +50,7 @@
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"mocha": "^9.2.0", "mocha": "^9.2.0",
"monaco-editor-core": "0.35.0-dev.20221208", "monaco-editor-core": "0.35.0-dev.20230127",
"parcel": "^2.7.0", "parcel": "^2.7.0",
"playwright": "^1.18.1", "playwright": "^1.18.1",
"prettier": "^2.5.1", "prettier": "^2.5.1",

@ -429,7 +429,7 @@ declare namespace monaco {
export interface IMarkdownString { export interface IMarkdownString {
readonly value: string; readonly value: string;
readonly isTrusted?: boolean; readonly isTrusted?: boolean | MarkdownStringTrustedOptions;
readonly supportThemeIcons?: boolean; readonly supportThemeIcons?: boolean;
readonly supportHtml?: boolean; readonly supportHtml?: boolean;
readonly baseUri?: UriComponents; readonly baseUri?: UriComponents;
@ -438,6 +438,10 @@ declare namespace monaco {
}; };
} }
export interface MarkdownStringTrustedOptions {
readonly enabledCommands: readonly string[];
}
export interface IKeyboardEvent { export interface IKeyboardEvent {
readonly _standardKeyboardEventBrand: true; readonly _standardKeyboardEventBrand: true;
readonly browserEvent: KeyboardEvent; readonly browserEvent: KeyboardEvent;
@ -446,6 +450,7 @@ declare namespace monaco {
readonly shiftKey: boolean; readonly shiftKey: boolean;
readonly altKey: boolean; readonly altKey: boolean;
readonly metaKey: boolean; readonly metaKey: boolean;
readonly altGraphKey: boolean;
readonly keyCode: KeyCode; readonly keyCode: KeyCode;
readonly code: string; readonly code: string;
equals(keybinding: number): boolean; equals(keybinding: number): boolean;
@ -668,11 +673,11 @@ declare namespace monaco {
/** /**
* Test if this range equals other. * Test if this range equals other.
*/ */
equalsRange(other: IRange | null): boolean; equalsRange(other: IRange | null | undefined): boolean;
/** /**
* Test if range `a` equals `b`. * 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) * 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. * Create a new empty range using this range's start position.
*/ */
collapseToStart(): Range; 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. * Create a new empty range using this range's start position.
*/ */
static collapseToStart(range: IRange): Range; 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; static fromPositions(start: IPosition, end?: IPosition): Range;
/** /**
* Create a `Range` from an `IRange`. * Create a `Range` from an `IRange`.
@ -983,7 +996,7 @@ declare namespace monaco.editor {
/** /**
* Change the language for a model. * Change the language for a model.
*/ */
export function setModelLanguage(model: ITextModel, languageId: string): void; export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;
/** /**
* Set the markers for a model. * Set the markers for a model.
@ -1248,7 +1261,7 @@ declare namespace monaco.editor {
*/ */
'semanticHighlighting.enabled'?: true | false | 'configuredByTheme'; '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. * Defaults to false.
*/ */
stablePeek?: boolean; stablePeek?: boolean;
@ -1380,6 +1393,7 @@ declare namespace monaco.editor {
startColumn: number; startColumn: number;
endLineNumber: number; endLineNumber: number;
endColumn: number; endColumn: number;
modelVersionId?: number;
relatedInformation?: IRelatedInformation[]; relatedInformation?: IRelatedInformation[];
tags?: MarkerTag[]; tags?: MarkerTag[];
} }
@ -1399,6 +1413,7 @@ declare namespace monaco.editor {
startColumn: number; startColumn: number;
endLineNumber: number; endLineNumber: number;
endColumn: number; endColumn: number;
modelVersionId?: number;
relatedInformation?: IRelatedInformation[]; relatedInformation?: IRelatedInformation[];
tags?: MarkerTag[]; tags?: MarkerTag[];
} }
@ -1768,6 +1783,7 @@ declare namespace monaco.editor {
readonly defaultEOL: DefaultEndOfLine; readonly defaultEOL: DefaultEndOfLine;
readonly trimAutoWhitespace: boolean; readonly trimAutoWhitespace: boolean;
readonly bracketPairColorizationOptions: BracketPairColorizationOptions; readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
get originalIndentSize(): number | 'tabSize';
} }
export interface BracketPairColorizationOptions { export interface BracketPairColorizationOptions {
@ -1777,7 +1793,7 @@ declare namespace monaco.editor {
export interface ITextModelUpdateOptions { export interface ITextModelUpdateOptions {
tabSize?: number; tabSize?: number;
indentSize?: number; indentSize?: number | 'tabSize';
insertSpaces?: boolean; insertSpaces?: boolean;
trimAutoWhitespace?: boolean; trimAutoWhitespace?: boolean;
bracketColorizationOptions?: BracketPairColorizationOptions; bracketColorizationOptions?: BracketPairColorizationOptions;
@ -1870,12 +1886,12 @@ declare namespace monaco.editor {
* @param range The range describing what text length to get. * @param range The range describing what text length to get.
* @return The text length. * @return The text length.
*/ */
getValueLengthInRange(range: IRange): number; getValueLengthInRange(range: IRange, eol?: EndOfLinePreference): number;
/** /**
* Get the character count of text in a certain range. * Get the character count of text in a certain range.
* @param range The range describing what text length to get. * @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. * Get the number of lines in the model.
*/ */
@ -2234,6 +2250,124 @@ declare namespace monaco.editor {
export interface ILineChange extends IChange { export interface ILineChange extends IChange {
readonly charChanges: ICharChange[] | undefined; 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 { export interface IDimension {
width: number; width: number;
height: number; height: number;
@ -2939,9 +3073,9 @@ declare namespace monaco.editor {
cursorSurroundingLinesStyle?: 'default' | 'all'; cursorSurroundingLinesStyle?: 'default' | 'all';
/** /**
* Render last line number when the file ends with a newline. * 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). * Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
* Defaults to 'prompt'. * Defaults to 'prompt'.
@ -3056,9 +3190,9 @@ declare namespace monaco.editor {
mouseStyle?: 'text' | 'default' | 'copy'; mouseStyle?: 'text' | 'default' | 'copy';
/** /**
* Enable smooth caret animation. * Enable smooth caret animation.
* Defaults to false. * Defaults to 'off'.
*/ */
cursorSmoothCaretAnimation?: boolean; cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';
/** /**
* Control the cursor style, either 'block' or 'line'. * Control the cursor style, either 'block' or 'line'.
* Defaults to 'line'. * Defaults to 'line'.
@ -3073,6 +3207,11 @@ declare namespace monaco.editor {
* Defaults to false. * Defaults to false.
*/ */
fontLigatures?: boolean | string; 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. * 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. * 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. * Configure word wrapping characters. A break will be introduced after these characters.
*/ */
wordWrapBreakAfterCharacters?: string; 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. * Performance guard: Stop rendering a line after x characters.
* Defaults to 10000. * Defaults to 10000.
@ -3172,6 +3317,10 @@ declare namespace monaco.editor {
* Enable inline color decorators and color picker rendering. * Enable inline color decorators and color picker rendering.
*/ */
colorDecorators?: boolean; 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. * Control the behaviour of comments in the editor.
*/ */
@ -3216,6 +3365,10 @@ declare namespace monaco.editor {
* Defaults to 'spread'. * Defaults to 'spread'.
*/ */
multiCursorPaste?: 'spread' | 'full'; 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. * 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'.
@ -3420,6 +3573,11 @@ declare namespace monaco.editor {
* Defaults to 'always'. * Defaults to 'always'.
*/ */
matchBrackets?: 'never' | 'near' | 'always'; matchBrackets?: 'never' | 'near' | 'always';
/**
* Enable experimental whitespace rendering.
* Defaults to 'svg'.
*/
experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';
/** /**
* Enable rendering of whitespace. * Enable rendering of whitespace.
* Defaults to 'selection'. * Defaults to 'selection'.
@ -3573,7 +3731,7 @@ declare namespace monaco.editor {
/** /**
* Diff Algorithm * Diff Algorithm
*/ */
diffAlgorithm?: 'smart' | 'experimental'; diffAlgorithm?: 'smart' | 'experimental' | IDocumentDiffProvider;
} }
/** /**
@ -3706,7 +3864,7 @@ declare namespace monaco.editor {
autoFindInSelection?: 'never' | 'always' | 'multiline'; autoFindInSelection?: 'never' | 'always' | 'multiline';
addExtraSpaceOnTop?: boolean; 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; loop?: boolean;
} }
@ -4172,6 +4330,7 @@ declare namespace monaco.editor {
* Defaults to `prefix`. * Defaults to `prefix`.
*/ */
mode?: 'prefix' | 'subword' | 'subwordSmart'; mode?: 'prefix' | 'subword' | 'subwordSmart';
showToolbar?: 'always' | 'onHover';
} }
export interface IBracketPairColorizationOptions { export interface IBracketPairColorizationOptions {
@ -4237,6 +4396,10 @@ declare namespace monaco.editor {
* Enable using global storage for remembering suggestions. * Enable using global storage for remembering suggestions.
*/ */
shareSuggestSelections?: boolean; 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. * Enable or disable icons in suggestions. Defaults to true.
*/ */
@ -4438,123 +4601,128 @@ declare namespace monaco.editor {
codeLensFontFamily = 15, codeLensFontFamily = 15,
codeLensFontSize = 16, codeLensFontSize = 16,
colorDecorators = 17, colorDecorators = 17,
columnSelection = 18, colorDecoratorsLimit = 18,
comments = 19, columnSelection = 19,
contextmenu = 20, comments = 20,
copyWithSyntaxHighlighting = 21, contextmenu = 21,
cursorBlinking = 22, copyWithSyntaxHighlighting = 22,
cursorSmoothCaretAnimation = 23, cursorBlinking = 23,
cursorStyle = 24, cursorSmoothCaretAnimation = 24,
cursorSurroundingLines = 25, cursorStyle = 25,
cursorSurroundingLinesStyle = 26, cursorSurroundingLines = 26,
cursorWidth = 27, cursorSurroundingLinesStyle = 27,
disableLayerHinting = 28, cursorWidth = 28,
disableMonospaceOptimizations = 29, disableLayerHinting = 29,
domReadOnly = 30, disableMonospaceOptimizations = 30,
dragAndDrop = 31, domReadOnly = 31,
dropIntoEditor = 32, dragAndDrop = 32,
emptySelectionClipboard = 33, dropIntoEditor = 33,
extraEditorClassName = 34, emptySelectionClipboard = 34,
fastScrollSensitivity = 35, experimentalWhitespaceRendering = 35,
find = 36, extraEditorClassName = 36,
fixedOverflowWidgets = 37, fastScrollSensitivity = 37,
folding = 38, find = 38,
foldingStrategy = 39, fixedOverflowWidgets = 39,
foldingHighlight = 40, folding = 40,
foldingImportsByDefault = 41, foldingStrategy = 41,
foldingMaximumRegions = 42, foldingHighlight = 42,
unfoldOnClickAfterEndOfLine = 43, foldingImportsByDefault = 43,
fontFamily = 44, foldingMaximumRegions = 44,
fontInfo = 45, unfoldOnClickAfterEndOfLine = 45,
fontLigatures = 46, fontFamily = 46,
fontSize = 47, fontInfo = 47,
fontWeight = 48, fontLigatures = 48,
formatOnPaste = 49, fontSize = 49,
formatOnType = 50, fontWeight = 50,
glyphMargin = 51, fontVariations = 51,
gotoLocation = 52, formatOnPaste = 52,
hideCursorInOverviewRuler = 53, formatOnType = 53,
hover = 54, glyphMargin = 54,
inDiffEditor = 55, gotoLocation = 55,
inlineSuggest = 56, hideCursorInOverviewRuler = 56,
letterSpacing = 57, hover = 57,
lightbulb = 58, inDiffEditor = 58,
lineDecorationsWidth = 59, inlineSuggest = 59,
lineHeight = 60, letterSpacing = 60,
lineNumbers = 61, lightbulb = 61,
lineNumbersMinChars = 62, lineDecorationsWidth = 62,
linkedEditing = 63, lineHeight = 63,
links = 64, lineNumbers = 64,
matchBrackets = 65, lineNumbersMinChars = 65,
minimap = 66, linkedEditing = 66,
mouseStyle = 67, links = 67,
mouseWheelScrollSensitivity = 68, matchBrackets = 68,
mouseWheelZoom = 69, minimap = 69,
multiCursorMergeOverlapping = 70, mouseStyle = 70,
multiCursorModifier = 71, mouseWheelScrollSensitivity = 71,
multiCursorPaste = 72, mouseWheelZoom = 72,
occurrencesHighlight = 73, multiCursorMergeOverlapping = 73,
overviewRulerBorder = 74, multiCursorModifier = 74,
overviewRulerLanes = 75, multiCursorPaste = 75,
padding = 76, multiCursorLimit = 76,
parameterHints = 77, occurrencesHighlight = 77,
peekWidgetDefaultFocus = 78, overviewRulerBorder = 78,
definitionLinkOpensInPeek = 79, overviewRulerLanes = 79,
quickSuggestions = 80, padding = 80,
quickSuggestionsDelay = 81, parameterHints = 81,
readOnly = 82, peekWidgetDefaultFocus = 82,
renameOnType = 83, definitionLinkOpensInPeek = 83,
renderControlCharacters = 84, quickSuggestions = 84,
renderFinalNewline = 85, quickSuggestionsDelay = 85,
renderLineHighlight = 86, readOnly = 86,
renderLineHighlightOnlyWhenFocus = 87, renameOnType = 87,
renderValidationDecorations = 88, renderControlCharacters = 88,
renderWhitespace = 89, renderFinalNewline = 89,
revealHorizontalRightPadding = 90, renderLineHighlight = 90,
roundedSelection = 91, renderLineHighlightOnlyWhenFocus = 91,
rulers = 92, renderValidationDecorations = 92,
scrollbar = 93, renderWhitespace = 93,
scrollBeyondLastColumn = 94, revealHorizontalRightPadding = 94,
scrollBeyondLastLine = 95, roundedSelection = 95,
scrollPredominantAxis = 96, rulers = 96,
selectionClipboard = 97, scrollbar = 97,
selectionHighlight = 98, scrollBeyondLastColumn = 98,
selectOnLineNumbers = 99, scrollBeyondLastLine = 99,
showFoldingControls = 100, scrollPredominantAxis = 100,
showUnused = 101, selectionClipboard = 101,
snippetSuggestions = 102, selectionHighlight = 102,
smartSelect = 103, selectOnLineNumbers = 103,
smoothScrolling = 104, showFoldingControls = 104,
stickyScroll = 105, showUnused = 105,
stickyTabStops = 106, snippetSuggestions = 106,
stopRenderingLineAfter = 107, smartSelect = 107,
suggest = 108, smoothScrolling = 108,
suggestFontSize = 109, stickyScroll = 109,
suggestLineHeight = 110, stickyTabStops = 110,
suggestOnTriggerCharacters = 111, stopRenderingLineAfter = 111,
suggestSelection = 112, suggest = 112,
tabCompletion = 113, suggestFontSize = 113,
tabIndex = 114, suggestLineHeight = 114,
unicodeHighlighting = 115, suggestOnTriggerCharacters = 115,
unusualLineTerminators = 116, suggestSelection = 116,
useShadowDOM = 117, tabCompletion = 117,
useTabStops = 118, tabIndex = 118,
wordSeparators = 119, unicodeHighlighting = 119,
wordWrap = 120, unusualLineTerminators = 120,
wordWrapBreakAfterCharacters = 121, useShadowDOM = 121,
wordWrapBreakBeforeCharacters = 122, useTabStops = 122,
wordWrapColumn = 123, wordBreak = 123,
wordWrapOverride1 = 124, wordSeparators = 124,
wordWrapOverride2 = 125, wordWrap = 125,
wrappingIndent = 126, wordWrapBreakAfterCharacters = 126,
wrappingStrategy = 127, wordWrapBreakBeforeCharacters = 127,
showDeprecated = 128, wordWrapColumn = 128,
inlayHints = 129, wordWrapOverride1 = 129,
editorClassName = 130, wordWrapOverride2 = 130,
pixelRatio = 131, wrappingIndent = 131,
tabFocusMode = 132, wrappingStrategy = 132,
layoutInfo = 133, showDeprecated = 133,
wrappingInfo = 134 inlayHints = 134,
editorClassName = 135,
pixelRatio = 136,
tabFocusMode = 137,
layoutInfo = 138,
wrappingInfo = 139
} }
export const EditorOptions: { export const EditorOptions: {
@ -4577,12 +4745,13 @@ declare namespace monaco.editor {
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>; codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>; codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>; colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>; columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>; comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>; contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>; copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>; cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, boolean>; cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>; cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>; cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>; cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;
@ -4594,6 +4763,7 @@ declare namespace monaco.editor {
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>; emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>; dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>; stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>; extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>; fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>; find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
@ -4609,6 +4779,7 @@ declare namespace monaco.editor {
fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>; fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;
fontSize: IEditorOption<EditorOption.fontSize, number>; fontSize: IEditorOption<EditorOption.fontSize, number>;
fontWeight: IEditorOption<EditorOption.fontWeight, string>; fontWeight: IEditorOption<EditorOption.fontWeight, string>;
fontVariations: IEditorOption<EditorOption.fontVariations, string>;
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>; formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>; formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>; glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
@ -4618,7 +4789,7 @@ declare namespace monaco.editor {
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>; inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>; letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>; lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, string | number>; lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
lineHeight: IEditorOption<EditorOption.lineHeight, number>; lineHeight: IEditorOption<EditorOption.lineHeight, number>;
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>; lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>; lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;
@ -4632,6 +4803,7 @@ declare namespace monaco.editor {
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>; multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>; multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>; multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>; occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>; overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>; overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
@ -4644,7 +4816,7 @@ declare namespace monaco.editor {
readOnly: IEditorOption<EditorOption.readOnly, boolean>; readOnly: IEditorOption<EditorOption.readOnly, boolean>;
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>; renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, 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'>; renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>; renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>; renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;
@ -4679,6 +4851,7 @@ declare namespace monaco.editor {
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>; unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>; useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>; useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>; wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>; wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>; wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
@ -4686,13 +4859,13 @@ declare namespace monaco.editor {
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>; wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>; wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, '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>; editorClassName: IEditorOption<EditorOption.editorClassName, string>;
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>; pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>; tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>; layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>; wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
}; };
type EditorOptionsType = typeof EditorOptions; type EditorOptionsType = typeof EditorOptions;
@ -4828,10 +5001,11 @@ declare namespace monaco.editor {
*/ */
position: IPosition | null; position: IPosition | null;
/** /**
* Optionally, a range can be provided to further * Optionally, a secondary position can be provided to further
* define the position of the content widget. * 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. * 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. * Get the vertical position (top offset) for the position w.r.t. to the first line.
*/ */
getTopForPosition(lineNumber: number, column: number): number; 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 * Returns the editor's container dom node
*/ */
@ -5632,6 +5810,7 @@ declare namespace monaco.editor {
readonly fontWeight: string; readonly fontWeight: string;
readonly fontSize: number; readonly fontSize: number;
readonly fontFeatureSettings: string; readonly fontFeatureSettings: string;
readonly fontVariationSettings: string;
readonly lineHeight: number; readonly lineHeight: number;
readonly letterSpacing: number; readonly letterSpacing: number;
} }
@ -6317,6 +6496,7 @@ declare namespace monaco.languages {
} }
export enum CompletionItemInsertTextRule { export enum CompletionItemInsertTextRule {
None = 0,
/** /**
* Adjust whitespace/indentation of multiline insert texts to * Adjust whitespace/indentation of multiline insert texts to
* match the current line indentation. * match the current line indentation.
@ -7412,7 +7592,7 @@ declare namespace monaco.languages {
log?: string; 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'] * This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
@ -8138,6 +8318,60 @@ declare namespace monaco.languages.typescript {
writeByteOrderMark: boolean; writeByteOrderMark: boolean;
text: string; 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 { export interface LanguageServiceDefaults {
/** /**
* Event fired when compiler options or diagnostics options are changed. * Event fired when compiler options or diagnostics options are changed.
@ -8149,6 +8383,8 @@ declare namespace monaco.languages.typescript {
readonly onDidExtraLibsChange: IEvent<void>; readonly onDidExtraLibsChange: IEvent<void>;
readonly workerOptions: WorkerOptions; readonly workerOptions: WorkerOptions;
readonly inlayHintsOptions: InlayHintsOptions; readonly inlayHintsOptions: InlayHintsOptions;
readonly modeConfiguration: ModeConfiguration;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
/** /**
* Get the current extra libs registered with the language service. * Get the current extra libs registered with the language service.
*/ */

@ -429,7 +429,7 @@ declare namespace monaco {
export interface IMarkdownString { export interface IMarkdownString {
readonly value: string; readonly value: string;
readonly isTrusted?: boolean; readonly isTrusted?: boolean | MarkdownStringTrustedOptions;
readonly supportThemeIcons?: boolean; readonly supportThemeIcons?: boolean;
readonly supportHtml?: boolean; readonly supportHtml?: boolean;
readonly baseUri?: UriComponents; readonly baseUri?: UriComponents;
@ -438,6 +438,10 @@ declare namespace monaco {
}; };
} }
export interface MarkdownStringTrustedOptions {
readonly enabledCommands: readonly string[];
}
export interface IKeyboardEvent { export interface IKeyboardEvent {
readonly _standardKeyboardEventBrand: true; readonly _standardKeyboardEventBrand: true;
readonly browserEvent: KeyboardEvent; readonly browserEvent: KeyboardEvent;
@ -446,6 +450,7 @@ declare namespace monaco {
readonly shiftKey: boolean; readonly shiftKey: boolean;
readonly altKey: boolean; readonly altKey: boolean;
readonly metaKey: boolean; readonly metaKey: boolean;
readonly altGraphKey: boolean;
readonly keyCode: KeyCode; readonly keyCode: KeyCode;
readonly code: string; readonly code: string;
equals(keybinding: number): boolean; equals(keybinding: number): boolean;
@ -668,11 +673,11 @@ declare namespace monaco {
/** /**
* Test if this range equals other. * Test if this range equals other.
*/ */
equalsRange(other: IRange | null): boolean; equalsRange(other: IRange | null | undefined): boolean;
/** /**
* Test if range `a` equals `b`. * 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) * 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. * Create a new empty range using this range's start position.
*/ */
collapseToStart(): Range; 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. * Create a new empty range using this range's start position.
*/ */
static collapseToStart(range: IRange): Range; 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; static fromPositions(start: IPosition, end?: IPosition): Range;
/** /**
* Create a `Range` from an `IRange`. * Create a `Range` from an `IRange`.
@ -983,7 +996,7 @@ declare namespace monaco.editor {
/** /**
* Change the language for a model. * Change the language for a model.
*/ */
export function setModelLanguage(model: ITextModel, languageId: string): void; export function setModelLanguage(model: ITextModel, mimeTypeOrLanguageId: string): void;
/** /**
* Set the markers for a model. * Set the markers for a model.
@ -1248,7 +1261,7 @@ declare namespace monaco.editor {
*/ */
'semanticHighlighting.enabled'?: true | false | 'configuredByTheme'; '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. * Defaults to false.
*/ */
stablePeek?: boolean; stablePeek?: boolean;
@ -1380,6 +1393,7 @@ declare namespace monaco.editor {
startColumn: number; startColumn: number;
endLineNumber: number; endLineNumber: number;
endColumn: number; endColumn: number;
modelVersionId?: number;
relatedInformation?: IRelatedInformation[]; relatedInformation?: IRelatedInformation[];
tags?: MarkerTag[]; tags?: MarkerTag[];
} }
@ -1399,6 +1413,7 @@ declare namespace monaco.editor {
startColumn: number; startColumn: number;
endLineNumber: number; endLineNumber: number;
endColumn: number; endColumn: number;
modelVersionId?: number;
relatedInformation?: IRelatedInformation[]; relatedInformation?: IRelatedInformation[];
tags?: MarkerTag[]; tags?: MarkerTag[];
} }
@ -1768,6 +1783,7 @@ declare namespace monaco.editor {
readonly defaultEOL: DefaultEndOfLine; readonly defaultEOL: DefaultEndOfLine;
readonly trimAutoWhitespace: boolean; readonly trimAutoWhitespace: boolean;
readonly bracketPairColorizationOptions: BracketPairColorizationOptions; readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
get originalIndentSize(): number | 'tabSize';
} }
export interface BracketPairColorizationOptions { export interface BracketPairColorizationOptions {
@ -1777,7 +1793,7 @@ declare namespace monaco.editor {
export interface ITextModelUpdateOptions { export interface ITextModelUpdateOptions {
tabSize?: number; tabSize?: number;
indentSize?: number; indentSize?: number | 'tabSize';
insertSpaces?: boolean; insertSpaces?: boolean;
trimAutoWhitespace?: boolean; trimAutoWhitespace?: boolean;
bracketColorizationOptions?: BracketPairColorizationOptions; bracketColorizationOptions?: BracketPairColorizationOptions;
@ -1870,12 +1886,12 @@ declare namespace monaco.editor {
* @param range The range describing what text length to get. * @param range The range describing what text length to get.
* @return The text length. * @return The text length.
*/ */
getValueLengthInRange(range: IRange): number; getValueLengthInRange(range: IRange, eol?: EndOfLinePreference): number;
/** /**
* Get the character count of text in a certain range. * Get the character count of text in a certain range.
* @param range The range describing what text length to get. * @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. * Get the number of lines in the model.
*/ */
@ -2234,6 +2250,124 @@ declare namespace monaco.editor {
export interface ILineChange extends IChange { export interface ILineChange extends IChange {
readonly charChanges: ICharChange[] | undefined; 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 { export interface IDimension {
width: number; width: number;
height: number; height: number;
@ -2939,9 +3073,9 @@ declare namespace monaco.editor {
cursorSurroundingLinesStyle?: 'default' | 'all'; cursorSurroundingLinesStyle?: 'default' | 'all';
/** /**
* Render last line number when the file ends with a newline. * 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). * Remove unusual line terminators like LINE SEPARATOR (LS), PARAGRAPH SEPARATOR (PS).
* Defaults to 'prompt'. * Defaults to 'prompt'.
@ -3056,9 +3190,9 @@ declare namespace monaco.editor {
mouseStyle?: 'text' | 'default' | 'copy'; mouseStyle?: 'text' | 'default' | 'copy';
/** /**
* Enable smooth caret animation. * Enable smooth caret animation.
* Defaults to false. * Defaults to 'off'.
*/ */
cursorSmoothCaretAnimation?: boolean; cursorSmoothCaretAnimation?: 'off' | 'explicit' | 'on';
/** /**
* Control the cursor style, either 'block' or 'line'. * Control the cursor style, either 'block' or 'line'.
* Defaults to 'line'. * Defaults to 'line'.
@ -3073,6 +3207,11 @@ declare namespace monaco.editor {
* Defaults to false. * Defaults to false.
*/ */
fontLigatures?: boolean | string; 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. * 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. * 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. * Configure word wrapping characters. A break will be introduced after these characters.
*/ */
wordWrapBreakAfterCharacters?: string; 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. * Performance guard: Stop rendering a line after x characters.
* Defaults to 10000. * Defaults to 10000.
@ -3172,6 +3317,10 @@ declare namespace monaco.editor {
* Enable inline color decorators and color picker rendering. * Enable inline color decorators and color picker rendering.
*/ */
colorDecorators?: boolean; 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. * Control the behaviour of comments in the editor.
*/ */
@ -3216,6 +3365,10 @@ declare namespace monaco.editor {
* Defaults to 'spread'. * Defaults to 'spread'.
*/ */
multiCursorPaste?: 'spread' | 'full'; 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. * 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'.
@ -3420,6 +3573,11 @@ declare namespace monaco.editor {
* Defaults to 'always'. * Defaults to 'always'.
*/ */
matchBrackets?: 'never' | 'near' | 'always'; matchBrackets?: 'never' | 'near' | 'always';
/**
* Enable experimental whitespace rendering.
* Defaults to 'svg'.
*/
experimentalWhitespaceRendering?: 'svg' | 'font' | 'off';
/** /**
* Enable rendering of whitespace. * Enable rendering of whitespace.
* Defaults to 'selection'. * Defaults to 'selection'.
@ -3573,7 +3731,7 @@ declare namespace monaco.editor {
/** /**
* Diff Algorithm * Diff Algorithm
*/ */
diffAlgorithm?: 'smart' | 'experimental'; diffAlgorithm?: 'smart' | 'experimental' | IDocumentDiffProvider;
} }
/** /**
@ -3706,7 +3864,7 @@ declare namespace monaco.editor {
autoFindInSelection?: 'never' | 'always' | 'multiline'; autoFindInSelection?: 'never' | 'always' | 'multiline';
addExtraSpaceOnTop?: boolean; 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; loop?: boolean;
} }
@ -4172,6 +4330,7 @@ declare namespace monaco.editor {
* Defaults to `prefix`. * Defaults to `prefix`.
*/ */
mode?: 'prefix' | 'subword' | 'subwordSmart'; mode?: 'prefix' | 'subword' | 'subwordSmart';
showToolbar?: 'always' | 'onHover';
} }
export interface IBracketPairColorizationOptions { export interface IBracketPairColorizationOptions {
@ -4237,6 +4396,10 @@ declare namespace monaco.editor {
* Enable using global storage for remembering suggestions. * Enable using global storage for remembering suggestions.
*/ */
shareSuggestSelections?: boolean; 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. * Enable or disable icons in suggestions. Defaults to true.
*/ */
@ -4438,123 +4601,128 @@ declare namespace monaco.editor {
codeLensFontFamily = 15, codeLensFontFamily = 15,
codeLensFontSize = 16, codeLensFontSize = 16,
colorDecorators = 17, colorDecorators = 17,
columnSelection = 18, colorDecoratorsLimit = 18,
comments = 19, columnSelection = 19,
contextmenu = 20, comments = 20,
copyWithSyntaxHighlighting = 21, contextmenu = 21,
cursorBlinking = 22, copyWithSyntaxHighlighting = 22,
cursorSmoothCaretAnimation = 23, cursorBlinking = 23,
cursorStyle = 24, cursorSmoothCaretAnimation = 24,
cursorSurroundingLines = 25, cursorStyle = 25,
cursorSurroundingLinesStyle = 26, cursorSurroundingLines = 26,
cursorWidth = 27, cursorSurroundingLinesStyle = 27,
disableLayerHinting = 28, cursorWidth = 28,
disableMonospaceOptimizations = 29, disableLayerHinting = 29,
domReadOnly = 30, disableMonospaceOptimizations = 30,
dragAndDrop = 31, domReadOnly = 31,
dropIntoEditor = 32, dragAndDrop = 32,
emptySelectionClipboard = 33, dropIntoEditor = 33,
extraEditorClassName = 34, emptySelectionClipboard = 34,
fastScrollSensitivity = 35, experimentalWhitespaceRendering = 35,
find = 36, extraEditorClassName = 36,
fixedOverflowWidgets = 37, fastScrollSensitivity = 37,
folding = 38, find = 38,
foldingStrategy = 39, fixedOverflowWidgets = 39,
foldingHighlight = 40, folding = 40,
foldingImportsByDefault = 41, foldingStrategy = 41,
foldingMaximumRegions = 42, foldingHighlight = 42,
unfoldOnClickAfterEndOfLine = 43, foldingImportsByDefault = 43,
fontFamily = 44, foldingMaximumRegions = 44,
fontInfo = 45, unfoldOnClickAfterEndOfLine = 45,
fontLigatures = 46, fontFamily = 46,
fontSize = 47, fontInfo = 47,
fontWeight = 48, fontLigatures = 48,
formatOnPaste = 49, fontSize = 49,
formatOnType = 50, fontWeight = 50,
glyphMargin = 51, fontVariations = 51,
gotoLocation = 52, formatOnPaste = 52,
hideCursorInOverviewRuler = 53, formatOnType = 53,
hover = 54, glyphMargin = 54,
inDiffEditor = 55, gotoLocation = 55,
inlineSuggest = 56, hideCursorInOverviewRuler = 56,
letterSpacing = 57, hover = 57,
lightbulb = 58, inDiffEditor = 58,
lineDecorationsWidth = 59, inlineSuggest = 59,
lineHeight = 60, letterSpacing = 60,
lineNumbers = 61, lightbulb = 61,
lineNumbersMinChars = 62, lineDecorationsWidth = 62,
linkedEditing = 63, lineHeight = 63,
links = 64, lineNumbers = 64,
matchBrackets = 65, lineNumbersMinChars = 65,
minimap = 66, linkedEditing = 66,
mouseStyle = 67, links = 67,
mouseWheelScrollSensitivity = 68, matchBrackets = 68,
mouseWheelZoom = 69, minimap = 69,
multiCursorMergeOverlapping = 70, mouseStyle = 70,
multiCursorModifier = 71, mouseWheelScrollSensitivity = 71,
multiCursorPaste = 72, mouseWheelZoom = 72,
occurrencesHighlight = 73, multiCursorMergeOverlapping = 73,
overviewRulerBorder = 74, multiCursorModifier = 74,
overviewRulerLanes = 75, multiCursorPaste = 75,
padding = 76, multiCursorLimit = 76,
parameterHints = 77, occurrencesHighlight = 77,
peekWidgetDefaultFocus = 78, overviewRulerBorder = 78,
definitionLinkOpensInPeek = 79, overviewRulerLanes = 79,
quickSuggestions = 80, padding = 80,
quickSuggestionsDelay = 81, parameterHints = 81,
readOnly = 82, peekWidgetDefaultFocus = 82,
renameOnType = 83, definitionLinkOpensInPeek = 83,
renderControlCharacters = 84, quickSuggestions = 84,
renderFinalNewline = 85, quickSuggestionsDelay = 85,
renderLineHighlight = 86, readOnly = 86,
renderLineHighlightOnlyWhenFocus = 87, renameOnType = 87,
renderValidationDecorations = 88, renderControlCharacters = 88,
renderWhitespace = 89, renderFinalNewline = 89,
revealHorizontalRightPadding = 90, renderLineHighlight = 90,
roundedSelection = 91, renderLineHighlightOnlyWhenFocus = 91,
rulers = 92, renderValidationDecorations = 92,
scrollbar = 93, renderWhitespace = 93,
scrollBeyondLastColumn = 94, revealHorizontalRightPadding = 94,
scrollBeyondLastLine = 95, roundedSelection = 95,
scrollPredominantAxis = 96, rulers = 96,
selectionClipboard = 97, scrollbar = 97,
selectionHighlight = 98, scrollBeyondLastColumn = 98,
selectOnLineNumbers = 99, scrollBeyondLastLine = 99,
showFoldingControls = 100, scrollPredominantAxis = 100,
showUnused = 101, selectionClipboard = 101,
snippetSuggestions = 102, selectionHighlight = 102,
smartSelect = 103, selectOnLineNumbers = 103,
smoothScrolling = 104, showFoldingControls = 104,
stickyScroll = 105, showUnused = 105,
stickyTabStops = 106, snippetSuggestions = 106,
stopRenderingLineAfter = 107, smartSelect = 107,
suggest = 108, smoothScrolling = 108,
suggestFontSize = 109, stickyScroll = 109,
suggestLineHeight = 110, stickyTabStops = 110,
suggestOnTriggerCharacters = 111, stopRenderingLineAfter = 111,
suggestSelection = 112, suggest = 112,
tabCompletion = 113, suggestFontSize = 113,
tabIndex = 114, suggestLineHeight = 114,
unicodeHighlighting = 115, suggestOnTriggerCharacters = 115,
unusualLineTerminators = 116, suggestSelection = 116,
useShadowDOM = 117, tabCompletion = 117,
useTabStops = 118, tabIndex = 118,
wordSeparators = 119, unicodeHighlighting = 119,
wordWrap = 120, unusualLineTerminators = 120,
wordWrapBreakAfterCharacters = 121, useShadowDOM = 121,
wordWrapBreakBeforeCharacters = 122, useTabStops = 122,
wordWrapColumn = 123, wordBreak = 123,
wordWrapOverride1 = 124, wordSeparators = 124,
wordWrapOverride2 = 125, wordWrap = 125,
wrappingIndent = 126, wordWrapBreakAfterCharacters = 126,
wrappingStrategy = 127, wordWrapBreakBeforeCharacters = 127,
showDeprecated = 128, wordWrapColumn = 128,
inlayHints = 129, wordWrapOverride1 = 129,
editorClassName = 130, wordWrapOverride2 = 130,
pixelRatio = 131, wrappingIndent = 131,
tabFocusMode = 132, wrappingStrategy = 132,
layoutInfo = 133, showDeprecated = 133,
wrappingInfo = 134 inlayHints = 134,
editorClassName = 135,
pixelRatio = 136,
tabFocusMode = 137,
layoutInfo = 138,
wrappingInfo = 139
} }
export const EditorOptions: { export const EditorOptions: {
@ -4577,12 +4745,13 @@ declare namespace monaco.editor {
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>; codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>; codeLensFontSize: IEditorOption<EditorOption.codeLensFontSize, number>;
colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>; colorDecorators: IEditorOption<EditorOption.colorDecorators, boolean>;
colorDecoratorsLimit: IEditorOption<EditorOption.colorDecoratorsLimit, number>;
columnSelection: IEditorOption<EditorOption.columnSelection, boolean>; columnSelection: IEditorOption<EditorOption.columnSelection, boolean>;
comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>; comments: IEditorOption<EditorOption.comments, Readonly<Required<IEditorCommentsOptions>>>;
contextmenu: IEditorOption<EditorOption.contextmenu, boolean>; contextmenu: IEditorOption<EditorOption.contextmenu, boolean>;
copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>; copyWithSyntaxHighlighting: IEditorOption<EditorOption.copyWithSyntaxHighlighting, boolean>;
cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>; cursorBlinking: IEditorOption<EditorOption.cursorBlinking, TextEditorCursorBlinkingStyle>;
cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, boolean>; cursorSmoothCaretAnimation: IEditorOption<EditorOption.cursorSmoothCaretAnimation, 'on' | 'off' | 'explicit'>;
cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>; cursorStyle: IEditorOption<EditorOption.cursorStyle, TextEditorCursorStyle>;
cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>; cursorSurroundingLines: IEditorOption<EditorOption.cursorSurroundingLines, number>;
cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>; cursorSurroundingLinesStyle: IEditorOption<EditorOption.cursorSurroundingLinesStyle, 'default' | 'all'>;
@ -4594,6 +4763,7 @@ declare namespace monaco.editor {
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>; emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>; dropIntoEditor: IEditorOption<EditorOption.dropIntoEditor, Readonly<Required<IDropIntoEditorOptions>>>;
stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>; stickyScroll: IEditorOption<EditorOption.stickyScroll, Readonly<Required<IEditorStickyScrollOptions>>>;
experimentalWhitespaceRendering: IEditorOption<EditorOption.experimentalWhitespaceRendering, 'off' | 'svg' | 'font'>;
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>; extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>; fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>; find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
@ -4609,6 +4779,7 @@ declare namespace monaco.editor {
fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>; fontLigatures2: IEditorOption<EditorOption.fontLigatures, string>;
fontSize: IEditorOption<EditorOption.fontSize, number>; fontSize: IEditorOption<EditorOption.fontSize, number>;
fontWeight: IEditorOption<EditorOption.fontWeight, string>; fontWeight: IEditorOption<EditorOption.fontWeight, string>;
fontVariations: IEditorOption<EditorOption.fontVariations, string>;
formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>; formatOnPaste: IEditorOption<EditorOption.formatOnPaste, boolean>;
formatOnType: IEditorOption<EditorOption.formatOnType, boolean>; formatOnType: IEditorOption<EditorOption.formatOnType, boolean>;
glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>; glyphMargin: IEditorOption<EditorOption.glyphMargin, boolean>;
@ -4618,7 +4789,7 @@ declare namespace monaco.editor {
inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>; inDiffEditor: IEditorOption<EditorOption.inDiffEditor, boolean>;
letterSpacing: IEditorOption<EditorOption.letterSpacing, number>; letterSpacing: IEditorOption<EditorOption.letterSpacing, number>;
lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>; lightbulb: IEditorOption<EditorOption.lightbulb, Readonly<Required<IEditorLightbulbOptions>>>;
lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, string | number>; lineDecorationsWidth: IEditorOption<EditorOption.lineDecorationsWidth, number>;
lineHeight: IEditorOption<EditorOption.lineHeight, number>; lineHeight: IEditorOption<EditorOption.lineHeight, number>;
lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>; lineNumbers: IEditorOption<EditorOption.lineNumbers, InternalEditorRenderLineNumbersOptions>;
lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>; lineNumbersMinChars: IEditorOption<EditorOption.lineNumbersMinChars, number>;
@ -4632,6 +4803,7 @@ declare namespace monaco.editor {
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>; multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>; multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>; multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>; occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, boolean>;
overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>; overviewRulerBorder: IEditorOption<EditorOption.overviewRulerBorder, boolean>;
overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>; overviewRulerLanes: IEditorOption<EditorOption.overviewRulerLanes, number>;
@ -4644,7 +4816,7 @@ declare namespace monaco.editor {
readOnly: IEditorOption<EditorOption.readOnly, boolean>; readOnly: IEditorOption<EditorOption.readOnly, boolean>;
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>; renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
renderControlCharacters: IEditorOption<EditorOption.renderControlCharacters, 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'>; renderLineHighlight: IEditorOption<EditorOption.renderLineHighlight, 'all' | 'line' | 'none' | 'gutter'>;
renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>; renderLineHighlightOnlyWhenFocus: IEditorOption<EditorOption.renderLineHighlightOnlyWhenFocus, boolean>;
renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>; renderValidationDecorations: IEditorOption<EditorOption.renderValidationDecorations, 'on' | 'off' | 'editable'>;
@ -4679,6 +4851,7 @@ declare namespace monaco.editor {
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>; unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>; useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>; useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>; wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>; wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>; wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
@ -4686,13 +4859,13 @@ declare namespace monaco.editor {
wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>; wordWrapColumn: IEditorOption<EditorOption.wordWrapColumn, number>;
wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>; wordWrapOverride1: IEditorOption<EditorOption.wordWrapOverride1, 'on' | 'off' | 'inherit'>;
wordWrapOverride2: IEditorOption<EditorOption.wordWrapOverride2, '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>; editorClassName: IEditorOption<EditorOption.editorClassName, string>;
pixelRatio: IEditorOption<EditorOption.pixelRatio, number>; pixelRatio: IEditorOption<EditorOption.pixelRatio, number>;
tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>; tabFocusMode: IEditorOption<EditorOption.tabFocusMode, boolean>;
layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>; layoutInfo: IEditorOption<EditorOption.layoutInfo, EditorLayoutInfo>;
wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>; wrappingInfo: IEditorOption<EditorOption.wrappingInfo, EditorWrappingInfo>;
wrappingIndent: IEditorOption<EditorOption.wrappingIndent, WrappingIndent>;
wrappingStrategy: IEditorOption<EditorOption.wrappingStrategy, 'simple' | 'advanced'>;
}; };
type EditorOptionsType = typeof EditorOptions; type EditorOptionsType = typeof EditorOptions;
@ -4828,10 +5001,11 @@ declare namespace monaco.editor {
*/ */
position: IPosition | null; position: IPosition | null;
/** /**
* Optionally, a range can be provided to further * Optionally, a secondary position can be provided to further
* define the position of the content widget. * 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. * 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. * Get the vertical position (top offset) for the position w.r.t. to the first line.
*/ */
getTopForPosition(lineNumber: number, column: number): number; 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 * Returns the editor's container dom node
*/ */
@ -5632,6 +5810,7 @@ declare namespace monaco.editor {
readonly fontWeight: string; readonly fontWeight: string;
readonly fontSize: number; readonly fontSize: number;
readonly fontFeatureSettings: string; readonly fontFeatureSettings: string;
readonly fontVariationSettings: string;
readonly lineHeight: number; readonly lineHeight: number;
readonly letterSpacing: number; readonly letterSpacing: number;
} }
@ -6317,6 +6496,7 @@ declare namespace monaco.languages {
} }
export enum CompletionItemInsertTextRule { export enum CompletionItemInsertTextRule {
None = 0,
/** /**
* Adjust whitespace/indentation of multiline insert texts to * Adjust whitespace/indentation of multiline insert texts to
* match the current line indentation. * match the current line indentation.
@ -7412,7 +7592,7 @@ declare namespace monaco.languages {
log?: string; 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'] * This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
@ -8138,6 +8318,60 @@ declare namespace monaco.languages.typescript {
writeByteOrderMark: boolean; writeByteOrderMark: boolean;
text: string; 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 { export interface LanguageServiceDefaults {
/** /**
* Event fired when compiler options or diagnostics options are changed. * Event fired when compiler options or diagnostics options are changed.
@ -8149,6 +8383,8 @@ declare namespace monaco.languages.typescript {
readonly onDidExtraLibsChange: IEvent<void>; readonly onDidExtraLibsChange: IEvent<void>;
readonly workerOptions: WorkerOptions; readonly workerOptions: WorkerOptions;
readonly inlayHintsOptions: InlayHintsOptions; readonly inlayHintsOptions: InlayHintsOptions;
readonly modeConfiguration: ModeConfiguration;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
/** /**
* Get the current extra libs registered with the language service. * Get the current extra libs registered with the language service.
*/ */

Loading…
Cancel
Save