Prepare for 0.25.0.

pull/2541/head
Henning Dieterichs 4 years ago
parent bfcb2c5b77
commit 62fab0cf3c
No known key found for this signature in database
GPG Key ID: 771381EFFDB9EC06

@ -1,5 +1,36 @@
# Monaco Editor Changelog
## [0.25.0] (11.06.2021)
* added a new feature `inlineSuggest` that features a provider api and new settings.
* added `suggest.preview` to toggle previewing the selected suggest item.
* added `suggest.showDeprecated`
* CSS/HTML: added support for [custom data format](https://code.visualstudio.com/blogs/2020/02/24/custom-data-format)
* HTML: added `registerHTMLLanguageService`
### Breaking changes
* renamed `inlineHints` to `inlayHints`.
### Thank you
Contributions to `monaco-editor`:
* [@JeanPerriault (El Jùanch0)](https://github.com/JeanPerriault): Fix error message in Safari - Semantic token play [PR #2486](https://github.com/microsoft/monaco-editor/pull/2486)
* [@jonatanklosko (Jonatan Kłosko)](https://github.com/jonatanklosko): Add Elixir sample [PR #2491](https://github.com/microsoft/monaco-editor/pull/2491)
Contributions to `monaco-languages`:
* [@akonatala (apoorva konatala)](https://github.com/akonatala): Update cameligo language support [PR #137](https://github.com/microsoft/monaco-languages/pull/137)
* [@anark](https://github.com/anark): Add aliases and mimetypes to liquid language [PR #136](https://github.com/microsoft/monaco-languages/pull/136)
* [@mattvague (Matt Vague)](https://github.com/mattvague): Fix incorrect filenames for liquid [PR #135](https://github.com/microsoft/monaco-languages/pull/135)
* [@spahnke (Sebastian Pahnke)](https://github.com/spahnke)
* [JS/TS] Add support for the RegExp Match Indices flag [PR #139](https://github.com/microsoft/monaco-languages/pull/139)
* [TS] Add override keyword [PR #140](https://github.com/microsoft/monaco-languages/pull/140)
Contributions to `monaco-typescript`:
* [@paranoidjk (paranoidjk)](https://github.com/paranoidjk): fix: support go to definition for extraLib file [PR #79](https://github.com/microsoft/monaco-typescript/pull/79)
## [0.24.0] (12.05.2021)
* added a setting `domReadOnly` which controls if the `<textarea>` used for editor input should have the DOM `readonly` attribute

@ -151,7 +151,7 @@ Open [http://localhost:8080/monaco-editor/test/?editor=src&monaco-typescript=src
#### 5. Update release note.
* API Change/Breaking Change/New and noteworthy
* Thank you
* Thank you ([use this tool](https://vscode-tools.azurewebsites.net/))
#### 6. Publish

30
package-lock.json generated

@ -2362,21 +2362,21 @@
}
},
"monaco-css": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.4.0.tgz",
"integrity": "sha512-1OM81/MjKxfSIzVtPenpE1NtueTxOy02EVoa43mx/3g0rggIeXIOJxHrLwL7X8POsatiFsbSgBAGk2NMyKaawQ==",
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.5.0.tgz",
"integrity": "sha512-y42LYPEAOFn9yKWDc4WWbjWUvUK9T6rISBfmDgnMujc1xholKd9OK6GVSlK3vv6nflLXH+X9MI+W36nrC1PvSQ==",
"dev": true
},
"monaco-editor-core": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.24.0.tgz",
"integrity": "sha512-WJAzpNYEaJp8Z7crIAiLCVln1zZdo4cFXCRuhTDN4A3tz6IK2NOXAtTOZ9iLKBTtd6eitZJ2Q1Fx8JN8rN3fWw==",
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.25.0.tgz",
"integrity": "sha512-PcaM+wCw2UggfECbBd/v5LDX5JtG/NS/9VAVYZj+azI2geoy6ohEpISPTJYiWRhk9yu8LxPDG6/NJXguzG2Bxg==",
"dev": true
},
"monaco-html": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.4.0.tgz",
"integrity": "sha512-I6LRXYaPOWk1RAG35NrIep0PBnmOUkF5/BWqnSoxU4Hb0bdFUDX33mJdSW7+HL9HmPmBxjsWFsMwc+/L3IBJIw==",
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.5.0.tgz",
"integrity": "sha512-PMCVXDeh2IU3sU5Bp1JXoyM55+CP9dOIkbcjPxqB7oegbrddiwlcOzHmglBpPckTab6kfd3tvrsj73OvgoNQXg==",
"dev": true
},
"monaco-json": {
@ -2386,15 +2386,15 @@
"dev": true
},
"monaco-languages": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.4.0.tgz",
"integrity": "sha512-63ZMAPgqBylS0kyC22QSKJWJmCRcwM7dWql1xtt9R7mCfzszfIIViSTiJ5vDSnzj0lH0aZh8OJggh/uZY6Vgnw==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.5.0.tgz",
"integrity": "sha512-nwVv15bM/RJFoW/17CQ9XN8N3pzx+JEX8zNGBIpPrHpuPM47XkPzzh//MiLdEM9eoYf0xUQpbv3ZFbHqtiCu8A==",
"dev": true
},
"monaco-typescript": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.4.0.tgz",
"integrity": "sha512-XdO/Du1IY2HajdmYvk6D0uP+WUS4+0T2/VbByNIkDoGA+3KKa8rKdJa3tjQ9r3gmZN2c8eCfyoCqpzlV7YqjQg==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.5.0.tgz",
"integrity": "sha512-iZtjrWbkn4S/QHZf2niKQdbBJSpHCXkNeMNZ94mwdxn1cYazD0fQHNIfkVVzEJ3wgZ8H59YIOym5aQjVjmfccQ==",
"dev": true
},
"ms": {

@ -22,12 +22,12 @@
"clean-css": "^5.1.1",
"event-stream": "4.0.1",
"gulp": "^4.0.2",
"monaco-css": "3.4.0",
"monaco-editor-core": "0.24.0",
"monaco-html": "3.4.0",
"monaco-css": "3.5.0",
"monaco-editor-core": "0.25.0",
"monaco-html": "3.5.0",
"monaco-json": "3.5.1",
"monaco-languages": "2.4.0",
"monaco-typescript": "4.4.0",
"monaco-languages": "2.5.0",
"monaco-typescript": "4.5.0",
"rimraf": "^3.0.2",
"typedoc": "^0.20.29",
"typescript": "4.2.3",

@ -72,7 +72,7 @@ function getModifier(modifiers) {
}
}
const tokenPattern = new RegExp('(?<=\\[)([a-zA-Z]+)((?:\\.[a-zA-Z]+)*)(?=\\])', 'g');
const tokenPattern = new RegExp('([a-zA-Z]+)((?:\\.[a-zA-Z]+)*)', 'g');
monaco.languages.registerDocumentSemanticTokensProvider('plaintext', {
getLegend: function () {

470
typedoc/monaco.d.ts vendored

@ -2978,6 +2978,7 @@ declare namespace monaco.editor {
* Suggest options.
*/
suggest?: ISuggestOptions;
inlineSuggest?: IInlineSuggestOptions;
/**
* Smart select options.
*/
@ -3233,7 +3234,7 @@ declare namespace monaco.editor {
/**
* Control the behavior and rendering of the inline hints.
*/
inlineHints?: IEditorInlineHintsOptions;
inlayHints?: IEditorInlayHintsOptions;
/**
* Control if the editor should use shadow DOM.
*/
@ -3598,9 +3599,9 @@ declare namespace monaco.editor {
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;
/**
* Configuration options for editor inlineHints
* Configuration options for editor inlayHints
*/
export interface IEditorInlineHintsOptions {
export interface IEditorInlayHintsOptions {
/**
* Enable the inline hints.
* Defaults to true.
@ -3618,7 +3619,7 @@ declare namespace monaco.editor {
fontFamily?: string;
}
export type EditorInlineHintsOptions = Readonly<Required<IEditorInlineHintsOptions>>;
export type EditorInlayHintsOptions = Readonly<Required<IEditorInlayHintsOptions>>;
/**
* Configuration options for editor minimap
@ -3817,6 +3818,15 @@ declare namespace monaco.editor {
readonly scrollByPage: boolean;
}
export interface IInlineSuggestOptions {
/**
* Enable or disable the rendering of automatic inline completions.
*/
enabled?: boolean;
}
export type InternalInlineSuggestOptions = Readonly<Required<IInlineSuggestOptions>>;
/**
* Configuration options for editor suggest widget
*/
@ -3849,6 +3859,10 @@ declare namespace monaco.editor {
* Enable or disable the suggest status bar.
*/
showStatusBar?: boolean;
/**
* Enable or disable the rendering of the suggestion preview.
*/
preview?: boolean;
/**
* Show details inline with the label. Defaults to true.
*/
@ -3865,6 +3879,10 @@ declare namespace monaco.editor {
* Show constructor-suggestions.
*/
showConstructors?: boolean;
/**
* Show deprecated-suggestions.
*/
showDeprecated?: boolean;
/**
* Show field-suggestions.
*/
@ -4053,83 +4071,84 @@ declare namespace monaco.editor {
highlightActiveIndentGuide = 49,
hover = 50,
inDiffEditor = 51,
letterSpacing = 52,
lightbulb = 53,
lineDecorationsWidth = 54,
lineHeight = 55,
lineNumbers = 56,
lineNumbersMinChars = 57,
linkedEditing = 58,
links = 59,
matchBrackets = 60,
minimap = 61,
mouseStyle = 62,
mouseWheelScrollSensitivity = 63,
mouseWheelZoom = 64,
multiCursorMergeOverlapping = 65,
multiCursorModifier = 66,
multiCursorPaste = 67,
occurrencesHighlight = 68,
overviewRulerBorder = 69,
overviewRulerLanes = 70,
padding = 71,
parameterHints = 72,
peekWidgetDefaultFocus = 73,
definitionLinkOpensInPeek = 74,
quickSuggestions = 75,
quickSuggestionsDelay = 76,
readOnly = 77,
renameOnType = 78,
renderControlCharacters = 79,
renderIndentGuides = 80,
renderFinalNewline = 81,
renderLineHighlight = 82,
renderLineHighlightOnlyWhenFocus = 83,
renderValidationDecorations = 84,
renderWhitespace = 85,
revealHorizontalRightPadding = 86,
roundedSelection = 87,
rulers = 88,
scrollbar = 89,
scrollBeyondLastColumn = 90,
scrollBeyondLastLine = 91,
scrollPredominantAxis = 92,
selectionClipboard = 93,
selectionHighlight = 94,
selectOnLineNumbers = 95,
showFoldingControls = 96,
showUnused = 97,
snippetSuggestions = 98,
smartSelect = 99,
smoothScrolling = 100,
stickyTabStops = 101,
stopRenderingLineAfter = 102,
suggest = 103,
suggestFontSize = 104,
suggestLineHeight = 105,
suggestOnTriggerCharacters = 106,
suggestSelection = 107,
tabCompletion = 108,
tabIndex = 109,
unusualLineTerminators = 110,
useShadowDOM = 111,
useTabStops = 112,
wordSeparators = 113,
wordWrap = 114,
wordWrapBreakAfterCharacters = 115,
wordWrapBreakBeforeCharacters = 116,
wordWrapColumn = 117,
wordWrapOverride1 = 118,
wordWrapOverride2 = 119,
wrappingIndent = 120,
wrappingStrategy = 121,
showDeprecated = 122,
inlineHints = 123,
editorClassName = 124,
pixelRatio = 125,
tabFocusMode = 126,
layoutInfo = 127,
wrappingInfo = 128
inlineSuggest = 52,
letterSpacing = 53,
lightbulb = 54,
lineDecorationsWidth = 55,
lineHeight = 56,
lineNumbers = 57,
lineNumbersMinChars = 58,
linkedEditing = 59,
links = 60,
matchBrackets = 61,
minimap = 62,
mouseStyle = 63,
mouseWheelScrollSensitivity = 64,
mouseWheelZoom = 65,
multiCursorMergeOverlapping = 66,
multiCursorModifier = 67,
multiCursorPaste = 68,
occurrencesHighlight = 69,
overviewRulerBorder = 70,
overviewRulerLanes = 71,
padding = 72,
parameterHints = 73,
peekWidgetDefaultFocus = 74,
definitionLinkOpensInPeek = 75,
quickSuggestions = 76,
quickSuggestionsDelay = 77,
readOnly = 78,
renameOnType = 79,
renderControlCharacters = 80,
renderIndentGuides = 81,
renderFinalNewline = 82,
renderLineHighlight = 83,
renderLineHighlightOnlyWhenFocus = 84,
renderValidationDecorations = 85,
renderWhitespace = 86,
revealHorizontalRightPadding = 87,
roundedSelection = 88,
rulers = 89,
scrollbar = 90,
scrollBeyondLastColumn = 91,
scrollBeyondLastLine = 92,
scrollPredominantAxis = 93,
selectionClipboard = 94,
selectionHighlight = 95,
selectOnLineNumbers = 96,
showFoldingControls = 97,
showUnused = 98,
snippetSuggestions = 99,
smartSelect = 100,
smoothScrolling = 101,
stickyTabStops = 102,
stopRenderingLineAfter = 103,
suggest = 104,
suggestFontSize = 105,
suggestLineHeight = 106,
suggestOnTriggerCharacters = 107,
suggestSelection = 108,
tabCompletion = 109,
tabIndex = 110,
unusualLineTerminators = 111,
useShadowDOM = 112,
useTabStops = 113,
wordSeparators = 114,
wordWrap = 115,
wordWrapBreakAfterCharacters = 116,
wordWrapBreakBeforeCharacters = 117,
wordWrapColumn = 118,
wordWrapOverride1 = 119,
wordWrapOverride2 = 120,
wrappingIndent = 121,
wrappingStrategy = 122,
showDeprecated = 123,
inlayHints = 124,
editorClassName = 125,
pixelRatio = 126,
tabFocusMode = 127,
layoutInfo = 128,
wrappingInfo = 129
}
export const EditorOptions: {
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@ -4232,12 +4251,13 @@ declare namespace monaco.editor {
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
inlineHints: IEditorOption<EditorOption.inlineHints, any>;
inlayHints: IEditorOption<EditorOption.inlayHints, any>;
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
smartSelect: IEditorOption<EditorOption.smartSelect, any>;
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
suggest: IEditorOption<EditorOption.suggest, InternalSuggestOptions>;
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, any>;
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
@ -4791,7 +4811,7 @@ declare namespace monaco.editor {
getRawOptions(): IEditorOptions;
/**
* Get value of the current model attached to this editor.
* @see `ITextModel.getValue`
* @see {@link ITextModel.getValue}
*/
getValue(options?: {
preserveBOM: boolean;
@ -4799,7 +4819,7 @@ declare namespace monaco.editor {
}): string;
/**
* Set the value of the current model attached to this editor.
* @see `ITextModel.setValue`
* @see {@link ITextModel.setValue}
*/
setValue(newValue: string): void;
/**
@ -4881,7 +4901,7 @@ declare namespace monaco.editor {
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
/**
* All decorations added through this call will get the ownerId of this editor.
* @see `ITextModel.deltaDecorations`
* @see {@link ITextModel.deltaDecorations}
*/
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
/**
@ -4986,7 +5006,7 @@ declare namespace monaco.editor {
*/
export interface IDiffEditor extends IEditor {
/**
* @see ICodeEditor.getDomNode
* @see {@link ICodeEditor.getDomNode}
*/
getDomNode(): HTMLElement;
/**
@ -5318,6 +5338,11 @@ declare namespace monaco.languages {
*/
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
/**
* Register an inline completions provider.
*/
export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable;
/**
* Contains additional diagnostic information about the context in which
* a [code action](#CodeActionProvider.provideCodeActions) is run.
@ -5573,7 +5598,7 @@ declare namespace monaco.languages {
}
/**
* A provider result represents the values a provider, like the [`HoverProvider`](#HoverProvider),
* A provider result represents the values a provider, like the {@link HoverProvider},
* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
* thenable.
@ -5708,13 +5733,13 @@ declare namespace monaco.languages {
documentation?: string | IMarkdownString;
/**
* A string that should be used when comparing this item
* with other items. When `falsy` the [label](#CompletionItem.label)
* with other items. When `falsy` the {@link CompletionItem.label label}
* is used.
*/
sortText?: string;
/**
* A string that should be used when filtering a set of
* completion items. When `falsy` the [label](#CompletionItem.label)
* completion items. When `falsy` the {@link CompletionItem.label label}
* is used.
*/
filterText?: string;
@ -5738,11 +5763,11 @@ declare namespace monaco.languages {
/**
* A range of text that should be replaced by this completion item.
*
* Defaults to a range from the start of the [current word](#TextDocument.getWordRangeAtPosition) to the
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
* current position.
*
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
*/
range: IRange | {
insert: IRange;
@ -5783,7 +5808,7 @@ declare namespace monaco.languages {
/**
* Contains additional information about the context in which
* [completion provider](#CompletionItemProvider.provideCompletionItems) is triggered.
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
*/
export interface CompletionContext {
/**
@ -5804,10 +5829,10 @@ declare namespace monaco.languages {
*
* When computing *complete* completion items is expensive, providers can optionally implement
* the `resolveCompletionItem`-function. In that case it is enough to return completion
* items with a [label](#CompletionItem.label) from the
* [provideCompletionItems](#CompletionItemProvider.provideCompletionItems)-function. Subsequently,
* items with a {@link CompletionItem.label label} from the
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
* the item, like adding [doc-comment](#CompletionItem.documentation) or [details](#CompletionItem.detail).
* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.
*/
export interface CompletionItemProvider {
triggerCharacters?: string[];
@ -5816,14 +5841,68 @@ declare namespace monaco.languages {
*/
provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
/**
* Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation)
* or [details](#CompletionItem.detail).
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
* or {@link CompletionItem.detail details}.
*
* The editor will only resolve a completion item once.
*/
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
}
/**
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
*/
export enum InlineCompletionTriggerKind {
/**
* Completion was triggered automatically while editing.
* It is sufficient to return a single completion item in this case.
*/
Automatic = 0,
/**
* Completion was triggered explicitly by a user gesture.
* Return multiple completion items to enable cycling through them.
*/
Explicit = 1
}
export interface InlineCompletionContext {
/**
* How the completion was triggered.
*/
readonly triggerKind: InlineCompletionTriggerKind;
}
export interface InlineCompletion {
/**
* The text to insert.
* If the text contains a line break, the range must end at the end of a line.
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
*/
readonly text: string;
/**
* The range to replace.
* Must begin and end on the same line.
*/
readonly range?: IRange;
readonly command?: Command;
}
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
readonly items: readonly TItem[];
}
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
/**
* Will be called when an item is shown.
*/
handleItemDidShow?(completions: T, item: T['items'][number]): void;
/**
* Will be called when a completions list is no longer in use and can be garbage-collected.
*/
freeInlineCompletions(completions: T): void;
}
export interface CodeAction {
title: string;
command?: Command;
@ -5962,7 +6041,7 @@ declare namespace monaco.languages {
*/
range: IRange;
/**
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
*/
kind?: DocumentHighlightKind;
}
@ -6289,12 +6368,12 @@ declare namespace monaco.languages {
*/
label: string;
/**
* An [edit](#TextEdit) which is applied to a document when selecting
* An {@link TextEdit edit} which is applied to a document when selecting
* this presentation for the color.
*/
textEdit?: TextEdit;
/**
* An optional array of additional [text edits](#TextEdit) that are applied when
* An optional array of additional {@link TextEdit text edits} that are applied when
* selecting this color presentation.
*/
additionalTextEdits?: TextEdit[];
@ -6366,10 +6445,10 @@ declare namespace monaco.languages {
*/
end: number;
/**
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
* like 'Fold all comments'. See
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
*/
kind?: FoldingRangeKind;
}
@ -6390,7 +6469,7 @@ declare namespace monaco.languages {
*/
static readonly Region: FoldingRangeKind;
/**
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
* Creates a new {@link FoldingRangeKind}.
*
* @param value of the kind.
*/
@ -6470,24 +6549,23 @@ declare namespace monaco.languages {
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
}
export enum InlineHintKind {
export enum InlayHintKind {
Other = 0,
Type = 1,
Parameter = 2
}
export interface InlineHint {
export interface InlayHint {
text: string;
range: IRange;
kind: InlineHintKind;
description?: string | IMarkdownString;
position: IPosition;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
export interface InlineHintsProvider {
onDidChangeInlineHints?: IEvent<void> | undefined;
provideInlineHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlineHint[]>;
export interface InlayHintsProvider {
onDidChangeInlayHints?: IEvent<void> | undefined;
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
}
export interface SemanticTokensLegend {
@ -7129,7 +7207,7 @@ declare namespace monaco.languages.typescript {
declare namespace monaco.languages.css {
export interface DiagnosticsOptions {
export interface Options {
readonly validate?: boolean;
readonly lint?: {
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
@ -7151,6 +7229,10 @@ declare namespace monaco.languages.css {
readonly float?: 'ignore' | 'warning' | 'error';
readonly idSelector?: 'ignore' | 'warning' | 'error';
};
/**
* Configures the CSS data types known by the langauge service.
*/
readonly data?: CSSDataConfiguration;
}
export interface ModeConfiguration {
/**
@ -7201,14 +7283,92 @@ declare namespace monaco.languages.css {
export interface LanguageServiceDefaults {
readonly languageId: string;
readonly onDidChange: IEvent<LanguageServiceDefaults>;
readonly diagnosticsOptions: DiagnosticsOptions;
readonly modeConfiguration: ModeConfiguration;
setDiagnosticsOptions(options: DiagnosticsOptions): void;
readonly options: Options;
setOptions(options: Options): void;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
/** @deprecated Use options instead */
readonly diagnosticsOptions: DiagnosticsOptions;
/** @deprecated Use setOptions instead */
setDiagnosticsOptions(options: DiagnosticsOptions): void;
}
/** @deprecated Use Options instead */
export type DiagnosticsOptions = Options;
export const cssDefaults: LanguageServiceDefaults;
export const scssDefaults: LanguageServiceDefaults;
export const lessDefaults: LanguageServiceDefaults;
export interface CSSDataConfiguration {
/**
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
*/
useDefaultDataProvider?: boolean;
/**
* Provides a set of custom data providers.
*/
dataProviders?: {
[providerId: string]: CSSDataV1;
};
}
/**
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
*/
export interface CSSDataV1 {
version: 1 | 1.1;
properties?: IPropertyData[];
atDirectives?: IAtDirectiveData[];
pseudoClasses?: IPseudoClassData[];
pseudoElements?: IPseudoElementData[];
}
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
export interface IReference {
name: string;
url: string;
}
export interface IPropertyData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
restrictions?: string[];
status?: EntryStatus;
syntax?: string;
values?: IValueData[];
references?: IReference[];
relevance?: number;
}
export interface IAtDirectiveData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface IPseudoClassData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface IPseudoElementData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface IValueData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface MarkupContent {
kind: MarkupKind;
value: string;
}
export type MarkupKind = 'plaintext' | 'markdown';
}
/*---------------------------------------------------------------------------------------------
@ -7346,7 +7506,7 @@ declare namespace monaco.languages.html {
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
}
export interface CompletionConfiguration {
[provider: string]: boolean;
[providerId: string]: boolean;
}
export interface Options {
/**
@ -7357,6 +7517,10 @@ declare namespace monaco.languages.html {
* A list of known schemas and/or associations of schemas to file names.
*/
readonly suggest?: CompletionConfiguration;
/**
* Configures the HTML data types known by the HTML langauge service.
*/
readonly data?: HTMLDataConfiguration;
}
export interface ModeConfiguration {
/**
@ -7414,8 +7578,80 @@ declare namespace monaco.languages.html {
readonly onDidChange: IEvent<LanguageServiceDefaults>;
readonly options: Options;
setOptions(options: Options): void;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
}
export const htmlLanguageService: LanguageServiceRegistration;
export const htmlDefaults: LanguageServiceDefaults;
export const handlebarLanguageService: LanguageServiceRegistration;
export const handlebarDefaults: LanguageServiceDefaults;
export const razorLanguageService: LanguageServiceRegistration;
export const razorDefaults: LanguageServiceDefaults;
export interface LanguageServiceRegistration extends IDisposable {
readonly defaults: LanguageServiceDefaults;
}
/**
* Registers a new HTML language service for the languageId.
* Note: 'html', 'handlebar' and 'razor' are registered by default.
*
* Use this method to register additional language ids with a HTML service.
* The language server has to be registered before an editor model is opened.
*/
export function registerHTMLLanguageService(
languageId: string,
options: Options,
modeConfiguration: ModeConfiguration
): LanguageServiceRegistration;
export interface HTMLDataConfiguration {
/**
* Defines whether the standard HTML tags and attributes are shown
*/
useDefaultDataProvider?: boolean;
/**
* Provides a set of custom data providers.
*/
dataProviders?: {
[providerId: string]: HTMLDataV1;
};
}
/**
* Custom HTML tags attributes and attribute values
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
*/
export interface HTMLDataV1 {
version: 1 | 1.1;
tags?: ITagData[];
globalAttributes?: IAttributeData[];
valueSets?: IValueSet[];
}
export interface IReference {
name: string;
url: string;
}
export interface ITagData {
name: string;
description?: string | MarkupContent;
attributes: IAttributeData[];
references?: IReference[];
}
export interface IAttributeData {
name: string;
description?: string | MarkupContent;
valueSet?: string;
values?: IValueData[];
references?: IReference[];
}
export interface IValueData {
name: string;
description?: string | MarkupContent;
references?: IReference[];
}
export interface IValueSet {
name: string;
values: IValueData[];
}
export interface MarkupContent {
kind: MarkupKind;
value: string;
}
export type MarkupKind = 'plaintext' | 'markdown';
}

@ -2978,6 +2978,7 @@ declare namespace monaco.editor {
* Suggest options.
*/
suggest?: ISuggestOptions;
inlineSuggest?: IInlineSuggestOptions;
/**
* Smart select options.
*/
@ -3233,7 +3234,7 @@ declare namespace monaco.editor {
/**
* Control the behavior and rendering of the inline hints.
*/
inlineHints?: IEditorInlineHintsOptions;
inlayHints?: IEditorInlayHintsOptions;
/**
* Control if the editor should use shadow DOM.
*/
@ -3598,9 +3599,9 @@ declare namespace monaco.editor {
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;
/**
* Configuration options for editor inlineHints
* Configuration options for editor inlayHints
*/
export interface IEditorInlineHintsOptions {
export interface IEditorInlayHintsOptions {
/**
* Enable the inline hints.
* Defaults to true.
@ -3618,7 +3619,7 @@ declare namespace monaco.editor {
fontFamily?: string;
}
export type EditorInlineHintsOptions = Readonly<Required<IEditorInlineHintsOptions>>;
export type EditorInlayHintsOptions = Readonly<Required<IEditorInlayHintsOptions>>;
/**
* Configuration options for editor minimap
@ -3817,6 +3818,15 @@ declare namespace monaco.editor {
readonly scrollByPage: boolean;
}
export interface IInlineSuggestOptions {
/**
* Enable or disable the rendering of automatic inline completions.
*/
enabled?: boolean;
}
export type InternalInlineSuggestOptions = Readonly<Required<IInlineSuggestOptions>>;
/**
* Configuration options for editor suggest widget
*/
@ -3849,6 +3859,10 @@ declare namespace monaco.editor {
* Enable or disable the suggest status bar.
*/
showStatusBar?: boolean;
/**
* Enable or disable the rendering of the suggestion preview.
*/
preview?: boolean;
/**
* Show details inline with the label. Defaults to true.
*/
@ -3865,6 +3879,10 @@ declare namespace monaco.editor {
* Show constructor-suggestions.
*/
showConstructors?: boolean;
/**
* Show deprecated-suggestions.
*/
showDeprecated?: boolean;
/**
* Show field-suggestions.
*/
@ -4053,83 +4071,84 @@ declare namespace monaco.editor {
highlightActiveIndentGuide = 49,
hover = 50,
inDiffEditor = 51,
letterSpacing = 52,
lightbulb = 53,
lineDecorationsWidth = 54,
lineHeight = 55,
lineNumbers = 56,
lineNumbersMinChars = 57,
linkedEditing = 58,
links = 59,
matchBrackets = 60,
minimap = 61,
mouseStyle = 62,
mouseWheelScrollSensitivity = 63,
mouseWheelZoom = 64,
multiCursorMergeOverlapping = 65,
multiCursorModifier = 66,
multiCursorPaste = 67,
occurrencesHighlight = 68,
overviewRulerBorder = 69,
overviewRulerLanes = 70,
padding = 71,
parameterHints = 72,
peekWidgetDefaultFocus = 73,
definitionLinkOpensInPeek = 74,
quickSuggestions = 75,
quickSuggestionsDelay = 76,
readOnly = 77,
renameOnType = 78,
renderControlCharacters = 79,
renderIndentGuides = 80,
renderFinalNewline = 81,
renderLineHighlight = 82,
renderLineHighlightOnlyWhenFocus = 83,
renderValidationDecorations = 84,
renderWhitespace = 85,
revealHorizontalRightPadding = 86,
roundedSelection = 87,
rulers = 88,
scrollbar = 89,
scrollBeyondLastColumn = 90,
scrollBeyondLastLine = 91,
scrollPredominantAxis = 92,
selectionClipboard = 93,
selectionHighlight = 94,
selectOnLineNumbers = 95,
showFoldingControls = 96,
showUnused = 97,
snippetSuggestions = 98,
smartSelect = 99,
smoothScrolling = 100,
stickyTabStops = 101,
stopRenderingLineAfter = 102,
suggest = 103,
suggestFontSize = 104,
suggestLineHeight = 105,
suggestOnTriggerCharacters = 106,
suggestSelection = 107,
tabCompletion = 108,
tabIndex = 109,
unusualLineTerminators = 110,
useShadowDOM = 111,
useTabStops = 112,
wordSeparators = 113,
wordWrap = 114,
wordWrapBreakAfterCharacters = 115,
wordWrapBreakBeforeCharacters = 116,
wordWrapColumn = 117,
wordWrapOverride1 = 118,
wordWrapOverride2 = 119,
wrappingIndent = 120,
wrappingStrategy = 121,
showDeprecated = 122,
inlineHints = 123,
editorClassName = 124,
pixelRatio = 125,
tabFocusMode = 126,
layoutInfo = 127,
wrappingInfo = 128
inlineSuggest = 52,
letterSpacing = 53,
lightbulb = 54,
lineDecorationsWidth = 55,
lineHeight = 56,
lineNumbers = 57,
lineNumbersMinChars = 58,
linkedEditing = 59,
links = 60,
matchBrackets = 61,
minimap = 62,
mouseStyle = 63,
mouseWheelScrollSensitivity = 64,
mouseWheelZoom = 65,
multiCursorMergeOverlapping = 66,
multiCursorModifier = 67,
multiCursorPaste = 68,
occurrencesHighlight = 69,
overviewRulerBorder = 70,
overviewRulerLanes = 71,
padding = 72,
parameterHints = 73,
peekWidgetDefaultFocus = 74,
definitionLinkOpensInPeek = 75,
quickSuggestions = 76,
quickSuggestionsDelay = 77,
readOnly = 78,
renameOnType = 79,
renderControlCharacters = 80,
renderIndentGuides = 81,
renderFinalNewline = 82,
renderLineHighlight = 83,
renderLineHighlightOnlyWhenFocus = 84,
renderValidationDecorations = 85,
renderWhitespace = 86,
revealHorizontalRightPadding = 87,
roundedSelection = 88,
rulers = 89,
scrollbar = 90,
scrollBeyondLastColumn = 91,
scrollBeyondLastLine = 92,
scrollPredominantAxis = 93,
selectionClipboard = 94,
selectionHighlight = 95,
selectOnLineNumbers = 96,
showFoldingControls = 97,
showUnused = 98,
snippetSuggestions = 99,
smartSelect = 100,
smoothScrolling = 101,
stickyTabStops = 102,
stopRenderingLineAfter = 103,
suggest = 104,
suggestFontSize = 105,
suggestLineHeight = 106,
suggestOnTriggerCharacters = 107,
suggestSelection = 108,
tabCompletion = 109,
tabIndex = 110,
unusualLineTerminators = 111,
useShadowDOM = 112,
useTabStops = 113,
wordSeparators = 114,
wordWrap = 115,
wordWrapBreakAfterCharacters = 116,
wordWrapBreakBeforeCharacters = 117,
wordWrapColumn = 118,
wordWrapOverride1 = 119,
wordWrapOverride2 = 120,
wrappingIndent = 121,
wrappingStrategy = 122,
showDeprecated = 123,
inlayHints = 124,
editorClassName = 125,
pixelRatio = 126,
tabFocusMode = 127,
layoutInfo = 128,
wrappingInfo = 129
}
export const EditorOptions: {
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
@ -4232,12 +4251,13 @@ declare namespace monaco.editor {
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
inlineHints: IEditorOption<EditorOption.inlineHints, any>;
inlayHints: IEditorOption<EditorOption.inlayHints, any>;
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
smartSelect: IEditorOption<EditorOption.smartSelect, any>;
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
suggest: IEditorOption<EditorOption.suggest, InternalSuggestOptions>;
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, any>;
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
@ -4791,7 +4811,7 @@ declare namespace monaco.editor {
getRawOptions(): IEditorOptions;
/**
* Get value of the current model attached to this editor.
* @see `ITextModel.getValue`
* @see {@link ITextModel.getValue}
*/
getValue(options?: {
preserveBOM: boolean;
@ -4799,7 +4819,7 @@ declare namespace monaco.editor {
}): string;
/**
* Set the value of the current model attached to this editor.
* @see `ITextModel.setValue`
* @see {@link ITextModel.setValue}
*/
setValue(newValue: string): void;
/**
@ -4881,7 +4901,7 @@ declare namespace monaco.editor {
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
/**
* All decorations added through this call will get the ownerId of this editor.
* @see `ITextModel.deltaDecorations`
* @see {@link ITextModel.deltaDecorations}
*/
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
/**
@ -4986,7 +5006,7 @@ declare namespace monaco.editor {
*/
export interface IDiffEditor extends IEditor {
/**
* @see ICodeEditor.getDomNode
* @see {@link ICodeEditor.getDomNode}
*/
getDomNode(): HTMLElement;
/**
@ -5318,6 +5338,11 @@ declare namespace monaco.languages {
*/
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
/**
* Register an inline completions provider.
*/
export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable;
/**
* Contains additional diagnostic information about the context in which
* a [code action](#CodeActionProvider.provideCodeActions) is run.
@ -5573,7 +5598,7 @@ declare namespace monaco.languages {
}
/**
* A provider result represents the values a provider, like the [`HoverProvider`](#HoverProvider),
* A provider result represents the values a provider, like the {@link HoverProvider},
* may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
* thenable.
@ -5708,13 +5733,13 @@ declare namespace monaco.languages {
documentation?: string | IMarkdownString;
/**
* A string that should be used when comparing this item
* with other items. When `falsy` the [label](#CompletionItem.label)
* with other items. When `falsy` the {@link CompletionItem.label label}
* is used.
*/
sortText?: string;
/**
* A string that should be used when filtering a set of
* completion items. When `falsy` the [label](#CompletionItem.label)
* completion items. When `falsy` the {@link CompletionItem.label label}
* is used.
*/
filterText?: string;
@ -5738,11 +5763,11 @@ declare namespace monaco.languages {
/**
* A range of text that should be replaced by this completion item.
*
* Defaults to a range from the start of the [current word](#TextDocument.getWordRangeAtPosition) to the
* Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
* current position.
*
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
*/
range: IRange | {
insert: IRange;
@ -5783,7 +5808,7 @@ declare namespace monaco.languages {
/**
* Contains additional information about the context in which
* [completion provider](#CompletionItemProvider.provideCompletionItems) is triggered.
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
*/
export interface CompletionContext {
/**
@ -5804,10 +5829,10 @@ declare namespace monaco.languages {
*
* When computing *complete* completion items is expensive, providers can optionally implement
* the `resolveCompletionItem`-function. In that case it is enough to return completion
* items with a [label](#CompletionItem.label) from the
* [provideCompletionItems](#CompletionItemProvider.provideCompletionItems)-function. Subsequently,
* items with a {@link CompletionItem.label label} from the
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
* the item, like adding [doc-comment](#CompletionItem.documentation) or [details](#CompletionItem.detail).
* the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.
*/
export interface CompletionItemProvider {
triggerCharacters?: string[];
@ -5816,14 +5841,68 @@ declare namespace monaco.languages {
*/
provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
/**
* Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation)
* or [details](#CompletionItem.detail).
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
* or {@link CompletionItem.detail details}.
*
* The editor will only resolve a completion item once.
*/
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
}
/**
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
*/
export enum InlineCompletionTriggerKind {
/**
* Completion was triggered automatically while editing.
* It is sufficient to return a single completion item in this case.
*/
Automatic = 0,
/**
* Completion was triggered explicitly by a user gesture.
* Return multiple completion items to enable cycling through them.
*/
Explicit = 1
}
export interface InlineCompletionContext {
/**
* How the completion was triggered.
*/
readonly triggerKind: InlineCompletionTriggerKind;
}
export interface InlineCompletion {
/**
* The text to insert.
* If the text contains a line break, the range must end at the end of a line.
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
*/
readonly text: string;
/**
* The range to replace.
* Must begin and end on the same line.
*/
readonly range?: IRange;
readonly command?: Command;
}
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
readonly items: readonly TItem[];
}
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
provideInlineCompletions(model: editor.ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
/**
* Will be called when an item is shown.
*/
handleItemDidShow?(completions: T, item: T['items'][number]): void;
/**
* Will be called when a completions list is no longer in use and can be garbage-collected.
*/
freeInlineCompletions(completions: T): void;
}
export interface CodeAction {
title: string;
command?: Command;
@ -5962,7 +6041,7 @@ declare namespace monaco.languages {
*/
range: IRange;
/**
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
*/
kind?: DocumentHighlightKind;
}
@ -6289,12 +6368,12 @@ declare namespace monaco.languages {
*/
label: string;
/**
* An [edit](#TextEdit) which is applied to a document when selecting
* An {@link TextEdit edit} which is applied to a document when selecting
* this presentation for the color.
*/
textEdit?: TextEdit;
/**
* An optional array of additional [text edits](#TextEdit) that are applied when
* An optional array of additional {@link TextEdit text edits} that are applied when
* selecting this color presentation.
*/
additionalTextEdits?: TextEdit[];
@ -6366,10 +6445,10 @@ declare namespace monaco.languages {
*/
end: number;
/**
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
* like 'Fold all comments'. See
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
*/
kind?: FoldingRangeKind;
}
@ -6390,7 +6469,7 @@ declare namespace monaco.languages {
*/
static readonly Region: FoldingRangeKind;
/**
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
* Creates a new {@link FoldingRangeKind}.
*
* @param value of the kind.
*/
@ -6470,24 +6549,23 @@ declare namespace monaco.languages {
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
}
export enum InlineHintKind {
export enum InlayHintKind {
Other = 0,
Type = 1,
Parameter = 2
}
export interface InlineHint {
export interface InlayHint {
text: string;
range: IRange;
kind: InlineHintKind;
description?: string | IMarkdownString;
position: IPosition;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
export interface InlineHintsProvider {
onDidChangeInlineHints?: IEvent<void> | undefined;
provideInlineHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlineHint[]>;
export interface InlayHintsProvider {
onDidChangeInlayHints?: IEvent<void> | undefined;
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
}
export interface SemanticTokensLegend {
@ -7129,7 +7207,7 @@ declare namespace monaco.languages.typescript {
declare namespace monaco.languages.css {
export interface DiagnosticsOptions {
export interface Options {
readonly validate?: boolean;
readonly lint?: {
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
@ -7151,6 +7229,10 @@ declare namespace monaco.languages.css {
readonly float?: 'ignore' | 'warning' | 'error';
readonly idSelector?: 'ignore' | 'warning' | 'error';
};
/**
* Configures the CSS data types known by the langauge service.
*/
readonly data?: CSSDataConfiguration;
}
export interface ModeConfiguration {
/**
@ -7201,14 +7283,92 @@ declare namespace monaco.languages.css {
export interface LanguageServiceDefaults {
readonly languageId: string;
readonly onDidChange: IEvent<LanguageServiceDefaults>;
readonly diagnosticsOptions: DiagnosticsOptions;
readonly modeConfiguration: ModeConfiguration;
setDiagnosticsOptions(options: DiagnosticsOptions): void;
readonly options: Options;
setOptions(options: Options): void;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
/** @deprecated Use options instead */
readonly diagnosticsOptions: DiagnosticsOptions;
/** @deprecated Use setOptions instead */
setDiagnosticsOptions(options: DiagnosticsOptions): void;
}
/** @deprecated Use Options instead */
export type DiagnosticsOptions = Options;
export const cssDefaults: LanguageServiceDefaults;
export const scssDefaults: LanguageServiceDefaults;
export const lessDefaults: LanguageServiceDefaults;
export interface CSSDataConfiguration {
/**
* Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
*/
useDefaultDataProvider?: boolean;
/**
* Provides a set of custom data providers.
*/
dataProviders?: {
[providerId: string]: CSSDataV1;
};
}
/**
* Custom CSS properties, at-directives, pseudoClasses and pseudoElements
* https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
*/
export interface CSSDataV1 {
version: 1 | 1.1;
properties?: IPropertyData[];
atDirectives?: IAtDirectiveData[];
pseudoClasses?: IPseudoClassData[];
pseudoElements?: IPseudoElementData[];
}
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
export interface IReference {
name: string;
url: string;
}
export interface IPropertyData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
restrictions?: string[];
status?: EntryStatus;
syntax?: string;
values?: IValueData[];
references?: IReference[];
relevance?: number;
}
export interface IAtDirectiveData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface IPseudoClassData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface IPseudoElementData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface IValueData {
name: string;
description?: string | MarkupContent;
browsers?: string[];
status?: EntryStatus;
references?: IReference[];
}
export interface MarkupContent {
kind: MarkupKind;
value: string;
}
export type MarkupKind = 'plaintext' | 'markdown';
}
/*---------------------------------------------------------------------------------------------
@ -7346,7 +7506,7 @@ declare namespace monaco.languages.html {
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
}
export interface CompletionConfiguration {
[provider: string]: boolean;
[providerId: string]: boolean;
}
export interface Options {
/**
@ -7357,6 +7517,10 @@ declare namespace monaco.languages.html {
* A list of known schemas and/or associations of schemas to file names.
*/
readonly suggest?: CompletionConfiguration;
/**
* Configures the HTML data types known by the HTML langauge service.
*/
readonly data?: HTMLDataConfiguration;
}
export interface ModeConfiguration {
/**
@ -7414,8 +7578,80 @@ declare namespace monaco.languages.html {
readonly onDidChange: IEvent<LanguageServiceDefaults>;
readonly options: Options;
setOptions(options: Options): void;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
}
export const htmlLanguageService: LanguageServiceRegistration;
export const htmlDefaults: LanguageServiceDefaults;
export const handlebarLanguageService: LanguageServiceRegistration;
export const handlebarDefaults: LanguageServiceDefaults;
export const razorLanguageService: LanguageServiceRegistration;
export const razorDefaults: LanguageServiceDefaults;
export interface LanguageServiceRegistration extends IDisposable {
readonly defaults: LanguageServiceDefaults;
}
/**
* Registers a new HTML language service for the languageId.
* Note: 'html', 'handlebar' and 'razor' are registered by default.
*
* Use this method to register additional language ids with a HTML service.
* The language server has to be registered before an editor model is opened.
*/
export function registerHTMLLanguageService(
languageId: string,
options: Options,
modeConfiguration: ModeConfiguration
): LanguageServiceRegistration;
export interface HTMLDataConfiguration {
/**
* Defines whether the standard HTML tags and attributes are shown
*/
useDefaultDataProvider?: boolean;
/**
* Provides a set of custom data providers.
*/
dataProviders?: {
[providerId: string]: HTMLDataV1;
};
}
/**
* Custom HTML tags attributes and attribute values
* https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
*/
export interface HTMLDataV1 {
version: 1 | 1.1;
tags?: ITagData[];
globalAttributes?: IAttributeData[];
valueSets?: IValueSet[];
}
export interface IReference {
name: string;
url: string;
}
export interface ITagData {
name: string;
description?: string | MarkupContent;
attributes: IAttributeData[];
references?: IReference[];
}
export interface IAttributeData {
name: string;
description?: string | MarkupContent;
valueSet?: string;
values?: IValueData[];
references?: IReference[];
}
export interface IValueData {
name: string;
description?: string | MarkupContent;
references?: IReference[];
}
export interface IValueSet {
name: string;
values: IValueData[];
}
export interface MarkupContent {
kind: MarkupKind;
value: string;
}
export type MarkupKind = 'plaintext' | 'markdown';
}

Loading…
Cancel
Save