Updates monaco to 0.28.0

pull/2674/head
Henning Dieterichs 3 years ago
parent fd784d74f6
commit 6f93540f34
No known key found for this signature in database
GPG Key ID: 771381EFFDB9EC06

36
package-lock.json generated

@ -2362,39 +2362,39 @@
} }
}, },
"monaco-css": { "monaco-css": {
"version": "3.7.0", "version": "3.8.1",
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.7.0.tgz", "resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.8.1.tgz",
"integrity": "sha512-a4n6cNu1duCWF/d9pVoASp9qllK2Ca/Qwc5xF3nRwgVHmvxJxhRfemsWdFFei217K0odVE2737TumKQl8yW5Yg==", "integrity": "sha512-biXG+Y7RVWY8QAXnteMafIIrqFxAvcmCsa87tWAHcNRZauY+3VjNbllBxklPAkK0T+YrZDMuq1YAAE8wKreYiA==",
"dev": true "dev": true
}, },
"monaco-editor-core": { "monaco-editor-core": {
"version": "0.27.0", "version": "0.28.1",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.27.0.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.28.1.tgz",
"integrity": "sha512-x7I0QiIwwvxt1lzYSoQjf1xGjtEPobFx3Zvrj+tWbJbJFsXUy11IJ6TEIZ2yRjEFzuy+vrlbcfASC6lcGg/xhw==", "integrity": "sha512-ikNy6KXmgKhV66W7xLkdECJLAAzDycUe6rhXbdmUaa6L23X70Y0jOaCj/W9gqAo4wUT3MpRmeKEgujNKKH9p8A==",
"dev": true "dev": true
}, },
"monaco-html": { "monaco-html": {
"version": "3.7.0", "version": "3.8.1",
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.7.0.tgz", "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.8.1.tgz",
"integrity": "sha512-G52mN9cmf9habyi1khw9fmMvwD2d2BTx782NLOuwBTXWaxsJeoVdN5PL1fHCEJdwbP//Jt0SWUG9UT+rN4g3Ig==", "integrity": "sha512-qg5TH6HVJiQctEccsPG3r+tE0BjxcNZv6fFjT4Sr7p1c0fN92SvoDbxrjyqfzIfGsVlr76OfzPShjy1SOCHreA==",
"dev": true "dev": true
}, },
"monaco-json": { "monaco-json": {
"version": "3.7.0", "version": "3.8.1",
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.7.0.tgz", "resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.8.1.tgz",
"integrity": "sha512-VaEIouXJMYR4Ew//1CjIV2xfvr5xIVMMfUtrxYMM7vEWUuozS60Fn4m+0EWbs4/BsAOJXH7PhU26nniuES9IHQ==", "integrity": "sha512-Uc8pSW9lljQwOznHIqVOeHaGEEjXK7ltbIjxXhkpi3XW7e/J+Sbt0JWpYjphD2EMb0MKCe2XhM8gBzRPF7lvYA==",
"dev": true "dev": true
}, },
"monaco-languages": { "monaco-languages": {
"version": "2.7.0", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.7.0.tgz", "resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.8.1.tgz",
"integrity": "sha512-3D96ZEMfdQq5BtDX28JcFMyD6wE1/XsCqniZ7t1Ac9oF2wRdPHMgOya3xkwKiOC1ZEcyFuhtaIYGfndlX77JNg==", "integrity": "sha512-hzUZFhuhUtTicdfhbj1xUQt2aXI/7ef5Ava4NG1Qd1HHSPPG8vFWyeKOlA+QX+EiFkiq21NWXynx4smQ/Qp61A==",
"dev": true "dev": true
}, },
"monaco-typescript": { "monaco-typescript": {
"version": "4.7.0", "version": "4.8.1",
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.7.0.tgz", "resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.8.1.tgz",
"integrity": "sha512-dw30nKjR6abg1IGDit42nlVMad6dzJD0ZkOUgagVZj1Sf6vVvH2s5tdvBUDwIT7rAOgpSoW1Tz9/sanu7qVObw==", "integrity": "sha512-H4spoQ8hTctMBd6vH/bBusF61slGCJF6BXsDkvurCcb8c8mrUhv3EiM6L09s4w/F9NJBbJ0xHezy3EvOEukEig==",
"dev": true "dev": true
}, },
"ms": { "ms": {

@ -22,12 +22,12 @@
"clean-css": "^5.1.1", "clean-css": "^5.1.1",
"event-stream": "4.0.1", "event-stream": "4.0.1",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"monaco-css": "3.7.0", "monaco-css": "3.8.1",
"monaco-editor-core": "0.28.1", "monaco-editor-core": "0.28.1",
"monaco-html": "3.7.0", "monaco-html": "3.8.1",
"monaco-json": "3.7.0", "monaco-json": "3.8.1",
"monaco-languages": "2.7.0", "monaco-languages": "2.8.1",
"monaco-typescript": "4.7.0", "monaco-typescript": "4.8.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"typedoc": "^0.20.29", "typedoc": "^0.20.29",
"typescript": "4.2.3", "typescript": "4.2.3",

312
typedoc/monaco.d.ts vendored

@ -10,6 +10,10 @@
declare let MonacoEnvironment: monaco.Environment | undefined; declare let MonacoEnvironment: monaco.Environment | undefined;
interface Window {
MonacoEnvironment?: monaco.Environment | undefined;
}
declare namespace monaco { declare namespace monaco {
export type Thenable<T> = PromiseLike<T>; export type Thenable<T> = PromiseLike<T>;
@ -621,7 +625,7 @@ declare namespace monaco {
*/ */
strictContainsRange(range: IRange): boolean; strictContainsRange(range: IRange): boolean;
/** /**
* Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false. * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
*/ */
static strictContainsRange(range: IRange, otherRange: IRange): boolean; static strictContainsRange(range: IRange, otherRange: IRange): boolean;
/** /**
@ -1403,7 +1407,8 @@ declare namespace monaco.editor {
isWholeLine?: boolean; isWholeLine?: boolean;
/** /**
* Specifies the stack order of a decoration. * Specifies the stack order of a decoration.
* A decoration with greater stack order is always in front of a decoration with a lower stack order. * A decoration with greater stack order is always in front of a decoration with
* a lower stack order when the decorations are on the same line.
*/ */
zIndex?: number; zIndex?: number;
/** /**
@ -1643,6 +1648,11 @@ declare namespace monaco.editor {
readonly insertSpaces: boolean; readonly insertSpaces: boolean;
readonly defaultEOL: DefaultEndOfLine; readonly defaultEOL: DefaultEndOfLine;
readonly trimAutoWhitespace: boolean; readonly trimAutoWhitespace: boolean;
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
}
export interface BracketPairColorizationOptions {
enabled: boolean;
} }
export interface ITextModelUpdateOptions { export interface ITextModelUpdateOptions {
@ -1650,6 +1660,7 @@ declare namespace monaco.editor {
indentSize?: number; indentSize?: number;
insertSpaces?: boolean; insertSpaces?: boolean;
trimAutoWhitespace?: boolean; trimAutoWhitespace?: boolean;
bracketColorizationOptions?: BracketPairColorizationOptions;
} }
export class FindMatch { export class FindMatch {
@ -2702,7 +2713,7 @@ declare namespace monaco.editor {
/** /**
* Control the rendering of line numbers. * Control the rendering of line numbers.
* If it is a function, it will be invoked when rendering a line number and the return value will be rendered. * If it is a function, it will be invoked when rendering a line number and the return value will be rendered.
* Otherwise, if it is a truey, line numbers will be rendered normally (equivalent of using an identity function). * Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).
* Otherwise, line numbers will not be rendered. * Otherwise, line numbers will not be rendered.
* Defaults to `on`. * Defaults to `on`.
*/ */
@ -3335,7 +3346,7 @@ declare namespace monaco.editor {
*/ */
originalAriaLabel?: string; originalAriaLabel?: string;
/** /**
* Aria label for modifed editor. * Aria label for modified editor.
*/ */
modifiedAriaLabel?: string; modifiedAriaLabel?: string;
} }
@ -3878,6 +3889,15 @@ declare namespace monaco.editor {
export type InternalInlineSuggestOptions = Readonly<Required<IInlineSuggestOptions>>; export type InternalInlineSuggestOptions = Readonly<Required<IInlineSuggestOptions>>;
export interface IBracketPairColorizationOptions {
/**
* Enable or disable bracket pair colorization.
*/
enabled?: boolean;
}
export type InternalBracketPairColorizationOptions = Readonly<Required<IBracketPairColorizationOptions>>;
/** /**
* Configuration options for editor suggest widget * Configuration options for editor suggest widget
*/ */
@ -4086,125 +4106,126 @@ declare namespace monaco.editor {
autoIndent = 9, autoIndent = 9,
automaticLayout = 10, automaticLayout = 10,
autoSurround = 11, autoSurround = 11,
codeLens = 12, bracketPairColorization = 12,
codeLensFontFamily = 13, codeLens = 13,
codeLensFontSize = 14, codeLensFontFamily = 14,
colorDecorators = 15, codeLensFontSize = 15,
columnSelection = 16, colorDecorators = 16,
comments = 17, columnSelection = 17,
contextmenu = 18, comments = 18,
copyWithSyntaxHighlighting = 19, contextmenu = 19,
cursorBlinking = 20, copyWithSyntaxHighlighting = 20,
cursorSmoothCaretAnimation = 21, cursorBlinking = 21,
cursorStyle = 22, cursorSmoothCaretAnimation = 22,
cursorSurroundingLines = 23, cursorStyle = 23,
cursorSurroundingLinesStyle = 24, cursorSurroundingLines = 24,
cursorWidth = 25, cursorSurroundingLinesStyle = 25,
disableLayerHinting = 26, cursorWidth = 26,
disableMonospaceOptimizations = 27, disableLayerHinting = 27,
domReadOnly = 28, disableMonospaceOptimizations = 28,
dragAndDrop = 29, domReadOnly = 29,
emptySelectionClipboard = 30, dragAndDrop = 30,
extraEditorClassName = 31, emptySelectionClipboard = 31,
fastScrollSensitivity = 32, extraEditorClassName = 32,
find = 33, fastScrollSensitivity = 33,
fixedOverflowWidgets = 34, find = 34,
folding = 35, fixedOverflowWidgets = 35,
foldingStrategy = 36, folding = 36,
foldingHighlight = 37, foldingStrategy = 37,
foldingImportsByDefault = 38, foldingHighlight = 38,
unfoldOnClickAfterEndOfLine = 39, foldingImportsByDefault = 39,
fontFamily = 40, unfoldOnClickAfterEndOfLine = 40,
fontInfo = 41, fontFamily = 41,
fontLigatures = 42, fontInfo = 42,
fontSize = 43, fontLigatures = 43,
fontWeight = 44, fontSize = 44,
formatOnPaste = 45, fontWeight = 45,
formatOnType = 46, formatOnPaste = 46,
glyphMargin = 47, formatOnType = 47,
gotoLocation = 48, glyphMargin = 48,
hideCursorInOverviewRuler = 49, gotoLocation = 49,
highlightActiveIndentGuide = 50, hideCursorInOverviewRuler = 50,
hover = 51, highlightActiveIndentGuide = 51,
inDiffEditor = 52, hover = 52,
inlineSuggest = 53, inDiffEditor = 53,
letterSpacing = 54, inlineSuggest = 54,
lightbulb = 55, letterSpacing = 55,
lineDecorationsWidth = 56, lightbulb = 56,
lineHeight = 57, lineDecorationsWidth = 57,
lineNumbers = 58, lineHeight = 58,
lineNumbersMinChars = 59, lineNumbers = 59,
linkedEditing = 60, lineNumbersMinChars = 60,
links = 61, linkedEditing = 61,
matchBrackets = 62, links = 62,
minimap = 63, matchBrackets = 63,
mouseStyle = 64, minimap = 64,
mouseWheelScrollSensitivity = 65, mouseStyle = 65,
mouseWheelZoom = 66, mouseWheelScrollSensitivity = 66,
multiCursorMergeOverlapping = 67, mouseWheelZoom = 67,
multiCursorModifier = 68, multiCursorMergeOverlapping = 68,
multiCursorPaste = 69, multiCursorModifier = 69,
occurrencesHighlight = 70, multiCursorPaste = 70,
overviewRulerBorder = 71, occurrencesHighlight = 71,
overviewRulerLanes = 72, overviewRulerBorder = 72,
padding = 73, overviewRulerLanes = 73,
parameterHints = 74, padding = 74,
peekWidgetDefaultFocus = 75, parameterHints = 75,
definitionLinkOpensInPeek = 76, peekWidgetDefaultFocus = 76,
quickSuggestions = 77, definitionLinkOpensInPeek = 77,
quickSuggestionsDelay = 78, quickSuggestions = 78,
readOnly = 79, quickSuggestionsDelay = 79,
renameOnType = 80, readOnly = 80,
renderControlCharacters = 81, renameOnType = 81,
renderIndentGuides = 82, renderControlCharacters = 82,
renderFinalNewline = 83, renderIndentGuides = 83,
renderLineHighlight = 84, renderFinalNewline = 84,
renderLineHighlightOnlyWhenFocus = 85, renderLineHighlight = 85,
renderValidationDecorations = 86, renderLineHighlightOnlyWhenFocus = 86,
renderWhitespace = 87, renderValidationDecorations = 87,
revealHorizontalRightPadding = 88, renderWhitespace = 88,
roundedSelection = 89, revealHorizontalRightPadding = 89,
rulers = 90, roundedSelection = 90,
scrollbar = 91, rulers = 91,
scrollBeyondLastColumn = 92, scrollbar = 92,
scrollBeyondLastLine = 93, scrollBeyondLastColumn = 93,
scrollPredominantAxis = 94, scrollBeyondLastLine = 94,
selectionClipboard = 95, scrollPredominantAxis = 95,
selectionHighlight = 96, selectionClipboard = 96,
selectOnLineNumbers = 97, selectionHighlight = 97,
showFoldingControls = 98, selectOnLineNumbers = 98,
showUnused = 99, showFoldingControls = 99,
snippetSuggestions = 100, showUnused = 100,
smartSelect = 101, snippetSuggestions = 101,
smoothScrolling = 102, smartSelect = 102,
stickyTabStops = 103, smoothScrolling = 103,
stopRenderingLineAfter = 104, stickyTabStops = 104,
suggest = 105, stopRenderingLineAfter = 105,
suggestFontSize = 106, suggest = 106,
suggestLineHeight = 107, suggestFontSize = 107,
suggestOnTriggerCharacters = 108, suggestLineHeight = 108,
suggestSelection = 109, suggestOnTriggerCharacters = 109,
tabCompletion = 110, suggestSelection = 110,
tabIndex = 111, tabCompletion = 111,
unusualLineTerminators = 112, tabIndex = 112,
useShadowDOM = 113, unusualLineTerminators = 113,
useTabStops = 114, useShadowDOM = 114,
wordSeparators = 115, useTabStops = 115,
wordWrap = 116, wordSeparators = 116,
wordWrapBreakAfterCharacters = 117, wordWrap = 117,
wordWrapBreakBeforeCharacters = 118, wordWrapBreakAfterCharacters = 118,
wordWrapColumn = 119, wordWrapBreakBeforeCharacters = 119,
wordWrapOverride1 = 120, wordWrapColumn = 120,
wordWrapOverride2 = 121, wordWrapOverride1 = 121,
wrappingIndent = 122, wordWrapOverride2 = 122,
wrappingStrategy = 123, wrappingIndent = 123,
showDeprecated = 124, wrappingStrategy = 124,
inlayHints = 125, showDeprecated = 125,
editorClassName = 126, inlayHints = 126,
pixelRatio = 127, editorClassName = 127,
tabFocusMode = 128, pixelRatio = 128,
layoutInfo = 129, tabFocusMode = 129,
wrappingInfo = 130 layoutInfo = 130,
wrappingInfo = 131
} }
export const EditorOptions: { export const EditorOptions: {
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>; acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@ -4219,6 +4240,7 @@ declare namespace monaco.editor {
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>; autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>; automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>; autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>;
bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, any>;
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>; stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
codeLens: IEditorOption<EditorOption.codeLens, boolean>; codeLens: IEditorOption<EditorOption.codeLens, boolean>;
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>; codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
@ -5338,7 +5360,7 @@ declare namespace monaco.languages {
/** /**
* Register a code action provider (used by e.g. quick fix). * Register a code action provider (used by e.g. quick fix).
*/ */
export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider): IDisposable; export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
/** /**
* Register a formatter that can handle only entire models. * Register a formatter that can handle only entire models.
@ -5431,6 +5453,21 @@ declare namespace monaco.languages {
provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>; provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
} }
/**
* Metadata about the type of code actions that a {@link CodeActionProvider} provides.
*/
export interface CodeActionProviderMetadata {
/**
* List of code action kinds that a {@link CodeActionProvider} may return.
*
* This list is used to determine if a given `CodeActionProvider` should be invoked or not.
* To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The
* list of kinds may either be generic, such as `["quickfix", "refactor", "source"]`, or list out every kind provided,
* such as `["quickfix.removeLine", "source.fixAll" ...]`.
*/
readonly providedCodeActionKinds?: readonly string[];
}
/** /**
* Describes how comments for a language work. * Describes how comments for a language work.
*/ */
@ -5486,6 +5523,11 @@ declare namespace monaco.languages {
* settings will be used. * settings will be used.
*/ */
surroundingPairs?: IAutoClosingPair[]; surroundingPairs?: IAutoClosingPair[];
/**
* Defines a list of bracket pairs that are colorized depending on their nesting level.
* If not set, the configured brackets will be used.
*/
colorizedBracketPairs?: CharacterPair[];
/** /**
* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting. * Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.
* *
@ -5919,6 +5961,12 @@ declare namespace monaco.languages {
* How the completion was triggered. * How the completion was triggered.
*/ */
readonly triggerKind: InlineCompletionTriggerKind; readonly triggerKind: InlineCompletionTriggerKind;
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
}
export interface SelectedSuggestionInfo {
range: IRange;
text: string;
} }
export interface InlineCompletion { export interface InlineCompletion {
@ -6982,6 +7030,15 @@ declare namespace monaco.languages.typescript {
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */ /** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
customWorkerPath?: string; customWorkerPath?: string;
} }
interface InlayHintsOptions {
readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all';
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean;
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
}
interface IExtraLib { interface IExtraLib {
content: string; content: string;
version: number; version: number;
@ -7040,6 +7097,7 @@ declare namespace monaco.languages.typescript {
*/ */
readonly onDidExtraLibsChange: IEvent<void>; readonly onDidExtraLibsChange: IEvent<void>;
readonly workerOptions: WorkerOptions; readonly workerOptions: WorkerOptions;
readonly inlayHintsOptions: InlayHintsOptions;
/** /**
* Get the current extra libs registered with the language service. * Get the current extra libs registered with the language service.
*/ */
@ -7241,6 +7299,12 @@ declare namespace monaco.languages.typescript {
errorCodes: number[], errorCodes: number[],
formatOptions: any formatOptions: any
): Promise<ReadonlyArray<any>>; ): Promise<ReadonlyArray<any>>;
/**
* Get inlay hints in the range of the file.
* @param fileName
* @returns `Promise<typescript.InlayHint[]>`
*/
provideInlayHints(fileName: string, start: number, end: number): Promise<ReadonlyArray<any>>;
} }
export const typescriptVersion: string; export const typescriptVersion: string;
export const typescriptDefaults: LanguageServiceDefaults; export const typescriptDefaults: LanguageServiceDefaults;

@ -10,6 +10,10 @@
declare let MonacoEnvironment: monaco.Environment | undefined; declare let MonacoEnvironment: monaco.Environment | undefined;
interface Window {
MonacoEnvironment?: monaco.Environment | undefined;
}
declare namespace monaco { declare namespace monaco {
export type Thenable<T> = PromiseLike<T>; export type Thenable<T> = PromiseLike<T>;
@ -621,7 +625,7 @@ declare namespace monaco {
*/ */
strictContainsRange(range: IRange): boolean; strictContainsRange(range: IRange): boolean;
/** /**
* Test if `otherRange` is strinctly in `range` (must start after, and end before). If the ranges are equal, will return false. * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
*/ */
static strictContainsRange(range: IRange, otherRange: IRange): boolean; static strictContainsRange(range: IRange, otherRange: IRange): boolean;
/** /**
@ -1403,7 +1407,8 @@ declare namespace monaco.editor {
isWholeLine?: boolean; isWholeLine?: boolean;
/** /**
* Specifies the stack order of a decoration. * Specifies the stack order of a decoration.
* A decoration with greater stack order is always in front of a decoration with a lower stack order. * A decoration with greater stack order is always in front of a decoration with
* a lower stack order when the decorations are on the same line.
*/ */
zIndex?: number; zIndex?: number;
/** /**
@ -1643,6 +1648,11 @@ declare namespace monaco.editor {
readonly insertSpaces: boolean; readonly insertSpaces: boolean;
readonly defaultEOL: DefaultEndOfLine; readonly defaultEOL: DefaultEndOfLine;
readonly trimAutoWhitespace: boolean; readonly trimAutoWhitespace: boolean;
readonly bracketPairColorizationOptions: BracketPairColorizationOptions;
}
export interface BracketPairColorizationOptions {
enabled: boolean;
} }
export interface ITextModelUpdateOptions { export interface ITextModelUpdateOptions {
@ -1650,6 +1660,7 @@ declare namespace monaco.editor {
indentSize?: number; indentSize?: number;
insertSpaces?: boolean; insertSpaces?: boolean;
trimAutoWhitespace?: boolean; trimAutoWhitespace?: boolean;
bracketColorizationOptions?: BracketPairColorizationOptions;
} }
export class FindMatch { export class FindMatch {
@ -2702,7 +2713,7 @@ declare namespace monaco.editor {
/** /**
* Control the rendering of line numbers. * Control the rendering of line numbers.
* If it is a function, it will be invoked when rendering a line number and the return value will be rendered. * If it is a function, it will be invoked when rendering a line number and the return value will be rendered.
* Otherwise, if it is a truey, line numbers will be rendered normally (equivalent of using an identity function). * Otherwise, if it is a truthy, line numbers will be rendered normally (equivalent of using an identity function).
* Otherwise, line numbers will not be rendered. * Otherwise, line numbers will not be rendered.
* Defaults to `on`. * Defaults to `on`.
*/ */
@ -3335,7 +3346,7 @@ declare namespace monaco.editor {
*/ */
originalAriaLabel?: string; originalAriaLabel?: string;
/** /**
* Aria label for modifed editor. * Aria label for modified editor.
*/ */
modifiedAriaLabel?: string; modifiedAriaLabel?: string;
} }
@ -3878,6 +3889,15 @@ declare namespace monaco.editor {
export type InternalInlineSuggestOptions = Readonly<Required<IInlineSuggestOptions>>; export type InternalInlineSuggestOptions = Readonly<Required<IInlineSuggestOptions>>;
export interface IBracketPairColorizationOptions {
/**
* Enable or disable bracket pair colorization.
*/
enabled?: boolean;
}
export type InternalBracketPairColorizationOptions = Readonly<Required<IBracketPairColorizationOptions>>;
/** /**
* Configuration options for editor suggest widget * Configuration options for editor suggest widget
*/ */
@ -4086,125 +4106,126 @@ declare namespace monaco.editor {
autoIndent = 9, autoIndent = 9,
automaticLayout = 10, automaticLayout = 10,
autoSurround = 11, autoSurround = 11,
codeLens = 12, bracketPairColorization = 12,
codeLensFontFamily = 13, codeLens = 13,
codeLensFontSize = 14, codeLensFontFamily = 14,
colorDecorators = 15, codeLensFontSize = 15,
columnSelection = 16, colorDecorators = 16,
comments = 17, columnSelection = 17,
contextmenu = 18, comments = 18,
copyWithSyntaxHighlighting = 19, contextmenu = 19,
cursorBlinking = 20, copyWithSyntaxHighlighting = 20,
cursorSmoothCaretAnimation = 21, cursorBlinking = 21,
cursorStyle = 22, cursorSmoothCaretAnimation = 22,
cursorSurroundingLines = 23, cursorStyle = 23,
cursorSurroundingLinesStyle = 24, cursorSurroundingLines = 24,
cursorWidth = 25, cursorSurroundingLinesStyle = 25,
disableLayerHinting = 26, cursorWidth = 26,
disableMonospaceOptimizations = 27, disableLayerHinting = 27,
domReadOnly = 28, disableMonospaceOptimizations = 28,
dragAndDrop = 29, domReadOnly = 29,
emptySelectionClipboard = 30, dragAndDrop = 30,
extraEditorClassName = 31, emptySelectionClipboard = 31,
fastScrollSensitivity = 32, extraEditorClassName = 32,
find = 33, fastScrollSensitivity = 33,
fixedOverflowWidgets = 34, find = 34,
folding = 35, fixedOverflowWidgets = 35,
foldingStrategy = 36, folding = 36,
foldingHighlight = 37, foldingStrategy = 37,
foldingImportsByDefault = 38, foldingHighlight = 38,
unfoldOnClickAfterEndOfLine = 39, foldingImportsByDefault = 39,
fontFamily = 40, unfoldOnClickAfterEndOfLine = 40,
fontInfo = 41, fontFamily = 41,
fontLigatures = 42, fontInfo = 42,
fontSize = 43, fontLigatures = 43,
fontWeight = 44, fontSize = 44,
formatOnPaste = 45, fontWeight = 45,
formatOnType = 46, formatOnPaste = 46,
glyphMargin = 47, formatOnType = 47,
gotoLocation = 48, glyphMargin = 48,
hideCursorInOverviewRuler = 49, gotoLocation = 49,
highlightActiveIndentGuide = 50, hideCursorInOverviewRuler = 50,
hover = 51, highlightActiveIndentGuide = 51,
inDiffEditor = 52, hover = 52,
inlineSuggest = 53, inDiffEditor = 53,
letterSpacing = 54, inlineSuggest = 54,
lightbulb = 55, letterSpacing = 55,
lineDecorationsWidth = 56, lightbulb = 56,
lineHeight = 57, lineDecorationsWidth = 57,
lineNumbers = 58, lineHeight = 58,
lineNumbersMinChars = 59, lineNumbers = 59,
linkedEditing = 60, lineNumbersMinChars = 60,
links = 61, linkedEditing = 61,
matchBrackets = 62, links = 62,
minimap = 63, matchBrackets = 63,
mouseStyle = 64, minimap = 64,
mouseWheelScrollSensitivity = 65, mouseStyle = 65,
mouseWheelZoom = 66, mouseWheelScrollSensitivity = 66,
multiCursorMergeOverlapping = 67, mouseWheelZoom = 67,
multiCursorModifier = 68, multiCursorMergeOverlapping = 68,
multiCursorPaste = 69, multiCursorModifier = 69,
occurrencesHighlight = 70, multiCursorPaste = 70,
overviewRulerBorder = 71, occurrencesHighlight = 71,
overviewRulerLanes = 72, overviewRulerBorder = 72,
padding = 73, overviewRulerLanes = 73,
parameterHints = 74, padding = 74,
peekWidgetDefaultFocus = 75, parameterHints = 75,
definitionLinkOpensInPeek = 76, peekWidgetDefaultFocus = 76,
quickSuggestions = 77, definitionLinkOpensInPeek = 77,
quickSuggestionsDelay = 78, quickSuggestions = 78,
readOnly = 79, quickSuggestionsDelay = 79,
renameOnType = 80, readOnly = 80,
renderControlCharacters = 81, renameOnType = 81,
renderIndentGuides = 82, renderControlCharacters = 82,
renderFinalNewline = 83, renderIndentGuides = 83,
renderLineHighlight = 84, renderFinalNewline = 84,
renderLineHighlightOnlyWhenFocus = 85, renderLineHighlight = 85,
renderValidationDecorations = 86, renderLineHighlightOnlyWhenFocus = 86,
renderWhitespace = 87, renderValidationDecorations = 87,
revealHorizontalRightPadding = 88, renderWhitespace = 88,
roundedSelection = 89, revealHorizontalRightPadding = 89,
rulers = 90, roundedSelection = 90,
scrollbar = 91, rulers = 91,
scrollBeyondLastColumn = 92, scrollbar = 92,
scrollBeyondLastLine = 93, scrollBeyondLastColumn = 93,
scrollPredominantAxis = 94, scrollBeyondLastLine = 94,
selectionClipboard = 95, scrollPredominantAxis = 95,
selectionHighlight = 96, selectionClipboard = 96,
selectOnLineNumbers = 97, selectionHighlight = 97,
showFoldingControls = 98, selectOnLineNumbers = 98,
showUnused = 99, showFoldingControls = 99,
snippetSuggestions = 100, showUnused = 100,
smartSelect = 101, snippetSuggestions = 101,
smoothScrolling = 102, smartSelect = 102,
stickyTabStops = 103, smoothScrolling = 103,
stopRenderingLineAfter = 104, stickyTabStops = 104,
suggest = 105, stopRenderingLineAfter = 105,
suggestFontSize = 106, suggest = 106,
suggestLineHeight = 107, suggestFontSize = 107,
suggestOnTriggerCharacters = 108, suggestLineHeight = 108,
suggestSelection = 109, suggestOnTriggerCharacters = 109,
tabCompletion = 110, suggestSelection = 110,
tabIndex = 111, tabCompletion = 111,
unusualLineTerminators = 112, tabIndex = 112,
useShadowDOM = 113, unusualLineTerminators = 113,
useTabStops = 114, useShadowDOM = 114,
wordSeparators = 115, useTabStops = 115,
wordWrap = 116, wordSeparators = 116,
wordWrapBreakAfterCharacters = 117, wordWrap = 117,
wordWrapBreakBeforeCharacters = 118, wordWrapBreakAfterCharacters = 118,
wordWrapColumn = 119, wordWrapBreakBeforeCharacters = 119,
wordWrapOverride1 = 120, wordWrapColumn = 120,
wordWrapOverride2 = 121, wordWrapOverride1 = 121,
wrappingIndent = 122, wordWrapOverride2 = 122,
wrappingStrategy = 123, wrappingIndent = 123,
showDeprecated = 124, wrappingStrategy = 124,
inlayHints = 125, showDeprecated = 125,
editorClassName = 126, inlayHints = 126,
pixelRatio = 127, editorClassName = 127,
tabFocusMode = 128, pixelRatio = 128,
layoutInfo = 129, tabFocusMode = 129,
wrappingInfo = 130 layoutInfo = 130,
wrappingInfo = 131
} }
export const EditorOptions: { export const EditorOptions: {
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>; acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@ -4219,6 +4240,7 @@ declare namespace monaco.editor {
autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>; autoIndent: IEditorOption<EditorOption.autoIndent, EditorAutoIndentStrategy>;
automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>; automaticLayout: IEditorOption<EditorOption.automaticLayout, boolean>;
autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>; autoSurround: IEditorOption<EditorOption.autoSurround, 'languageDefined' | 'never' | 'quotes' | 'brackets'>;
bracketPairColorization: IEditorOption<EditorOption.bracketPairColorization, any>;
stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>; stickyTabStops: IEditorOption<EditorOption.stickyTabStops, boolean>;
codeLens: IEditorOption<EditorOption.codeLens, boolean>; codeLens: IEditorOption<EditorOption.codeLens, boolean>;
codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>; codeLensFontFamily: IEditorOption<EditorOption.codeLensFontFamily, string>;
@ -5338,7 +5360,7 @@ declare namespace monaco.languages {
/** /**
* Register a code action provider (used by e.g. quick fix). * Register a code action provider (used by e.g. quick fix).
*/ */
export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider): IDisposable; export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
/** /**
* Register a formatter that can handle only entire models. * Register a formatter that can handle only entire models.
@ -5431,6 +5453,21 @@ declare namespace monaco.languages {
provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>; provideCodeActions(model: editor.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
} }
/**
* Metadata about the type of code actions that a {@link CodeActionProvider} provides.
*/
export interface CodeActionProviderMetadata {
/**
* List of code action kinds that a {@link CodeActionProvider} may return.
*
* This list is used to determine if a given `CodeActionProvider` should be invoked or not.
* To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The
* list of kinds may either be generic, such as `["quickfix", "refactor", "source"]`, or list out every kind provided,
* such as `["quickfix.removeLine", "source.fixAll" ...]`.
*/
readonly providedCodeActionKinds?: readonly string[];
}
/** /**
* Describes how comments for a language work. * Describes how comments for a language work.
*/ */
@ -5486,6 +5523,11 @@ declare namespace monaco.languages {
* settings will be used. * settings will be used.
*/ */
surroundingPairs?: IAutoClosingPair[]; surroundingPairs?: IAutoClosingPair[];
/**
* Defines a list of bracket pairs that are colorized depending on their nesting level.
* If not set, the configured brackets will be used.
*/
colorizedBracketPairs?: CharacterPair[];
/** /**
* Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting. * Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.
* *
@ -5919,6 +5961,12 @@ declare namespace monaco.languages {
* How the completion was triggered. * How the completion was triggered.
*/ */
readonly triggerKind: InlineCompletionTriggerKind; readonly triggerKind: InlineCompletionTriggerKind;
readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
}
export interface SelectedSuggestionInfo {
range: IRange;
text: string;
} }
export interface InlineCompletion { export interface InlineCompletion {
@ -6982,6 +7030,15 @@ declare namespace monaco.languages.typescript {
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */ /** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
customWorkerPath?: string; customWorkerPath?: string;
} }
interface InlayHintsOptions {
readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all';
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
readonly includeInlayFunctionParameterTypeHints?: boolean;
readonly includeInlayVariableTypeHints?: boolean;
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
readonly includeInlayEnumMemberValueHints?: boolean;
}
interface IExtraLib { interface IExtraLib {
content: string; content: string;
version: number; version: number;
@ -7040,6 +7097,7 @@ declare namespace monaco.languages.typescript {
*/ */
readonly onDidExtraLibsChange: IEvent<void>; readonly onDidExtraLibsChange: IEvent<void>;
readonly workerOptions: WorkerOptions; readonly workerOptions: WorkerOptions;
readonly inlayHintsOptions: InlayHintsOptions;
/** /**
* Get the current extra libs registered with the language service. * Get the current extra libs registered with the language service.
*/ */
@ -7241,6 +7299,12 @@ declare namespace monaco.languages.typescript {
errorCodes: number[], errorCodes: number[],
formatOptions: any formatOptions: any
): Promise<ReadonlyArray<any>>; ): Promise<ReadonlyArray<any>>;
/**
* Get inlay hints in the range of the file.
* @param fileName
* @returns `Promise<typescript.InlayHint[]>`
*/
provideInlayHints(fileName: string, start: number, end: number): Promise<ReadonlyArray<any>>;
} }
export const typescriptVersion: string; export const typescriptVersion: string;
export const typescriptDefaults: LanguageServiceDefaults; export const typescriptDefaults: LanguageServiceDefaults;

Loading…
Cancel
Save