mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Prepare for 0.25.0.
This commit is contained in:
parent
bfcb2c5b77
commit
62fab0cf3c
7 changed files with 759 additions and 256 deletions
31
CHANGELOG.md
31
CHANGELOG.md
|
|
@ -1,5 +1,36 @@
|
||||||
# Monaco Editor Changelog
|
# 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)
|
## [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
|
* 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.
|
#### 5. Update release note.
|
||||||
* API Change/Breaking Change/New and noteworthy
|
* API Change/Breaking Change/New and noteworthy
|
||||||
* Thank you
|
* Thank you ([use this tool](https://vscode-tools.azurewebsites.net/))
|
||||||
|
|
||||||
#### 6. Publish
|
#### 6. Publish
|
||||||
|
|
||||||
|
|
|
||||||
30
package-lock.json
generated
30
package-lock.json
generated
|
|
@ -2362,21 +2362,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"monaco-css": {
|
"monaco-css": {
|
||||||
"version": "3.4.0",
|
"version": "3.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.5.0.tgz",
|
||||||
"integrity": "sha512-1OM81/MjKxfSIzVtPenpE1NtueTxOy02EVoa43mx/3g0rggIeXIOJxHrLwL7X8POsatiFsbSgBAGk2NMyKaawQ==",
|
"integrity": "sha512-y42LYPEAOFn9yKWDc4WWbjWUvUK9T6rISBfmDgnMujc1xholKd9OK6GVSlK3vv6nflLXH+X9MI+W36nrC1PvSQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-editor-core": {
|
"monaco-editor-core": {
|
||||||
"version": "0.24.0",
|
"version": "0.25.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.25.0.tgz",
|
||||||
"integrity": "sha512-WJAzpNYEaJp8Z7crIAiLCVln1zZdo4cFXCRuhTDN4A3tz6IK2NOXAtTOZ9iLKBTtd6eitZJ2Q1Fx8JN8rN3fWw==",
|
"integrity": "sha512-PcaM+wCw2UggfECbBd/v5LDX5JtG/NS/9VAVYZj+azI2geoy6ohEpISPTJYiWRhk9yu8LxPDG6/NJXguzG2Bxg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-html": {
|
"monaco-html": {
|
||||||
"version": "3.4.0",
|
"version": "3.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.5.0.tgz",
|
||||||
"integrity": "sha512-I6LRXYaPOWk1RAG35NrIep0PBnmOUkF5/BWqnSoxU4Hb0bdFUDX33mJdSW7+HL9HmPmBxjsWFsMwc+/L3IBJIw==",
|
"integrity": "sha512-PMCVXDeh2IU3sU5Bp1JXoyM55+CP9dOIkbcjPxqB7oegbrddiwlcOzHmglBpPckTab6kfd3tvrsj73OvgoNQXg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-json": {
|
"monaco-json": {
|
||||||
|
|
@ -2386,15 +2386,15 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-languages": {
|
"monaco-languages": {
|
||||||
"version": "2.4.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.5.0.tgz",
|
||||||
"integrity": "sha512-63ZMAPgqBylS0kyC22QSKJWJmCRcwM7dWql1xtt9R7mCfzszfIIViSTiJ5vDSnzj0lH0aZh8OJggh/uZY6Vgnw==",
|
"integrity": "sha512-nwVv15bM/RJFoW/17CQ9XN8N3pzx+JEX8zNGBIpPrHpuPM47XkPzzh//MiLdEM9eoYf0xUQpbv3ZFbHqtiCu8A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-typescript": {
|
"monaco-typescript": {
|
||||||
"version": "4.4.0",
|
"version": "4.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.5.0.tgz",
|
||||||
"integrity": "sha512-XdO/Du1IY2HajdmYvk6D0uP+WUS4+0T2/VbByNIkDoGA+3KKa8rKdJa3tjQ9r3gmZN2c8eCfyoCqpzlV7YqjQg==",
|
"integrity": "sha512-iZtjrWbkn4S/QHZf2niKQdbBJSpHCXkNeMNZ94mwdxn1cYazD0fQHNIfkVVzEJ3wgZ8H59YIOym5aQjVjmfccQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
|
|
|
||||||
10
package.json
10
package.json
|
|
@ -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.4.0",
|
"monaco-css": "3.5.0",
|
||||||
"monaco-editor-core": "0.24.0",
|
"monaco-editor-core": "0.25.0",
|
||||||
"monaco-html": "3.4.0",
|
"monaco-html": "3.5.0",
|
||||||
"monaco-json": "3.5.1",
|
"monaco-json": "3.5.1",
|
||||||
"monaco-languages": "2.4.0",
|
"monaco-languages": "2.5.0",
|
||||||
"monaco-typescript": "4.4.0",
|
"monaco-typescript": "4.5.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typedoc": "^0.20.29",
|
"typedoc": "^0.20.29",
|
||||||
"typescript": "4.2.3",
|
"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', {
|
monaco.languages.registerDocumentSemanticTokensProvider('plaintext', {
|
||||||
getLegend: function () {
|
getLegend: function () {
|
||||||
|
|
|
||||||
470
typedoc/monaco.d.ts
vendored
470
typedoc/monaco.d.ts
vendored
|
|
@ -2978,6 +2978,7 @@ declare namespace monaco.editor {
|
||||||
* Suggest options.
|
* Suggest options.
|
||||||
*/
|
*/
|
||||||
suggest?: ISuggestOptions;
|
suggest?: ISuggestOptions;
|
||||||
|
inlineSuggest?: IInlineSuggestOptions;
|
||||||
/**
|
/**
|
||||||
* Smart select options.
|
* Smart select options.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3233,7 +3234,7 @@ declare namespace monaco.editor {
|
||||||
/**
|
/**
|
||||||
* Control the behavior and rendering of the inline hints.
|
* Control the behavior and rendering of the inline hints.
|
||||||
*/
|
*/
|
||||||
inlineHints?: IEditorInlineHintsOptions;
|
inlayHints?: IEditorInlayHintsOptions;
|
||||||
/**
|
/**
|
||||||
* Control if the editor should use shadow DOM.
|
* Control if the editor should use shadow DOM.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3598,9 +3599,9 @@ declare namespace monaco.editor {
|
||||||
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;
|
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.
|
* Enable the inline hints.
|
||||||
* Defaults to true.
|
* Defaults to true.
|
||||||
|
|
@ -3618,7 +3619,7 @@ declare namespace monaco.editor {
|
||||||
fontFamily?: string;
|
fontFamily?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EditorInlineHintsOptions = Readonly<Required<IEditorInlineHintsOptions>>;
|
export type EditorInlayHintsOptions = Readonly<Required<IEditorInlayHintsOptions>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration options for editor minimap
|
* Configuration options for editor minimap
|
||||||
|
|
@ -3817,6 +3818,15 @@ declare namespace monaco.editor {
|
||||||
readonly scrollByPage: boolean;
|
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
|
* Configuration options for editor suggest widget
|
||||||
*/
|
*/
|
||||||
|
|
@ -3849,6 +3859,10 @@ declare namespace monaco.editor {
|
||||||
* Enable or disable the suggest status bar.
|
* Enable or disable the suggest status bar.
|
||||||
*/
|
*/
|
||||||
showStatusBar?: boolean;
|
showStatusBar?: boolean;
|
||||||
|
/**
|
||||||
|
* Enable or disable the rendering of the suggestion preview.
|
||||||
|
*/
|
||||||
|
preview?: boolean;
|
||||||
/**
|
/**
|
||||||
* Show details inline with the label. Defaults to true.
|
* Show details inline with the label. Defaults to true.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3865,6 +3879,10 @@ declare namespace monaco.editor {
|
||||||
* Show constructor-suggestions.
|
* Show constructor-suggestions.
|
||||||
*/
|
*/
|
||||||
showConstructors?: boolean;
|
showConstructors?: boolean;
|
||||||
|
/**
|
||||||
|
* Show deprecated-suggestions.
|
||||||
|
*/
|
||||||
|
showDeprecated?: boolean;
|
||||||
/**
|
/**
|
||||||
* Show field-suggestions.
|
* Show field-suggestions.
|
||||||
*/
|
*/
|
||||||
|
|
@ -4053,83 +4071,84 @@ declare namespace monaco.editor {
|
||||||
highlightActiveIndentGuide = 49,
|
highlightActiveIndentGuide = 49,
|
||||||
hover = 50,
|
hover = 50,
|
||||||
inDiffEditor = 51,
|
inDiffEditor = 51,
|
||||||
letterSpacing = 52,
|
inlineSuggest = 52,
|
||||||
lightbulb = 53,
|
letterSpacing = 53,
|
||||||
lineDecorationsWidth = 54,
|
lightbulb = 54,
|
||||||
lineHeight = 55,
|
lineDecorationsWidth = 55,
|
||||||
lineNumbers = 56,
|
lineHeight = 56,
|
||||||
lineNumbersMinChars = 57,
|
lineNumbers = 57,
|
||||||
linkedEditing = 58,
|
lineNumbersMinChars = 58,
|
||||||
links = 59,
|
linkedEditing = 59,
|
||||||
matchBrackets = 60,
|
links = 60,
|
||||||
minimap = 61,
|
matchBrackets = 61,
|
||||||
mouseStyle = 62,
|
minimap = 62,
|
||||||
mouseWheelScrollSensitivity = 63,
|
mouseStyle = 63,
|
||||||
mouseWheelZoom = 64,
|
mouseWheelScrollSensitivity = 64,
|
||||||
multiCursorMergeOverlapping = 65,
|
mouseWheelZoom = 65,
|
||||||
multiCursorModifier = 66,
|
multiCursorMergeOverlapping = 66,
|
||||||
multiCursorPaste = 67,
|
multiCursorModifier = 67,
|
||||||
occurrencesHighlight = 68,
|
multiCursorPaste = 68,
|
||||||
overviewRulerBorder = 69,
|
occurrencesHighlight = 69,
|
||||||
overviewRulerLanes = 70,
|
overviewRulerBorder = 70,
|
||||||
padding = 71,
|
overviewRulerLanes = 71,
|
||||||
parameterHints = 72,
|
padding = 72,
|
||||||
peekWidgetDefaultFocus = 73,
|
parameterHints = 73,
|
||||||
definitionLinkOpensInPeek = 74,
|
peekWidgetDefaultFocus = 74,
|
||||||
quickSuggestions = 75,
|
definitionLinkOpensInPeek = 75,
|
||||||
quickSuggestionsDelay = 76,
|
quickSuggestions = 76,
|
||||||
readOnly = 77,
|
quickSuggestionsDelay = 77,
|
||||||
renameOnType = 78,
|
readOnly = 78,
|
||||||
renderControlCharacters = 79,
|
renameOnType = 79,
|
||||||
renderIndentGuides = 80,
|
renderControlCharacters = 80,
|
||||||
renderFinalNewline = 81,
|
renderIndentGuides = 81,
|
||||||
renderLineHighlight = 82,
|
renderFinalNewline = 82,
|
||||||
renderLineHighlightOnlyWhenFocus = 83,
|
renderLineHighlight = 83,
|
||||||
renderValidationDecorations = 84,
|
renderLineHighlightOnlyWhenFocus = 84,
|
||||||
renderWhitespace = 85,
|
renderValidationDecorations = 85,
|
||||||
revealHorizontalRightPadding = 86,
|
renderWhitespace = 86,
|
||||||
roundedSelection = 87,
|
revealHorizontalRightPadding = 87,
|
||||||
rulers = 88,
|
roundedSelection = 88,
|
||||||
scrollbar = 89,
|
rulers = 89,
|
||||||
scrollBeyondLastColumn = 90,
|
scrollbar = 90,
|
||||||
scrollBeyondLastLine = 91,
|
scrollBeyondLastColumn = 91,
|
||||||
scrollPredominantAxis = 92,
|
scrollBeyondLastLine = 92,
|
||||||
selectionClipboard = 93,
|
scrollPredominantAxis = 93,
|
||||||
selectionHighlight = 94,
|
selectionClipboard = 94,
|
||||||
selectOnLineNumbers = 95,
|
selectionHighlight = 95,
|
||||||
showFoldingControls = 96,
|
selectOnLineNumbers = 96,
|
||||||
showUnused = 97,
|
showFoldingControls = 97,
|
||||||
snippetSuggestions = 98,
|
showUnused = 98,
|
||||||
smartSelect = 99,
|
snippetSuggestions = 99,
|
||||||
smoothScrolling = 100,
|
smartSelect = 100,
|
||||||
stickyTabStops = 101,
|
smoothScrolling = 101,
|
||||||
stopRenderingLineAfter = 102,
|
stickyTabStops = 102,
|
||||||
suggest = 103,
|
stopRenderingLineAfter = 103,
|
||||||
suggestFontSize = 104,
|
suggest = 104,
|
||||||
suggestLineHeight = 105,
|
suggestFontSize = 105,
|
||||||
suggestOnTriggerCharacters = 106,
|
suggestLineHeight = 106,
|
||||||
suggestSelection = 107,
|
suggestOnTriggerCharacters = 107,
|
||||||
tabCompletion = 108,
|
suggestSelection = 108,
|
||||||
tabIndex = 109,
|
tabCompletion = 109,
|
||||||
unusualLineTerminators = 110,
|
tabIndex = 110,
|
||||||
useShadowDOM = 111,
|
unusualLineTerminators = 111,
|
||||||
useTabStops = 112,
|
useShadowDOM = 112,
|
||||||
wordSeparators = 113,
|
useTabStops = 113,
|
||||||
wordWrap = 114,
|
wordSeparators = 114,
|
||||||
wordWrapBreakAfterCharacters = 115,
|
wordWrap = 115,
|
||||||
wordWrapBreakBeforeCharacters = 116,
|
wordWrapBreakAfterCharacters = 116,
|
||||||
wordWrapColumn = 117,
|
wordWrapBreakBeforeCharacters = 117,
|
||||||
wordWrapOverride1 = 118,
|
wordWrapColumn = 118,
|
||||||
wordWrapOverride2 = 119,
|
wordWrapOverride1 = 119,
|
||||||
wrappingIndent = 120,
|
wordWrapOverride2 = 120,
|
||||||
wrappingStrategy = 121,
|
wrappingIndent = 121,
|
||||||
showDeprecated = 122,
|
wrappingStrategy = 122,
|
||||||
inlineHints = 123,
|
showDeprecated = 123,
|
||||||
editorClassName = 124,
|
inlayHints = 124,
|
||||||
pixelRatio = 125,
|
editorClassName = 125,
|
||||||
tabFocusMode = 126,
|
pixelRatio = 126,
|
||||||
layoutInfo = 127,
|
tabFocusMode = 127,
|
||||||
wrappingInfo = 128
|
layoutInfo = 128,
|
||||||
|
wrappingInfo = 129
|
||||||
}
|
}
|
||||||
export const EditorOptions: {
|
export const EditorOptions: {
|
||||||
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
||||||
|
|
@ -4232,12 +4251,13 @@ declare namespace monaco.editor {
|
||||||
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
||||||
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
||||||
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
||||||
inlineHints: IEditorOption<EditorOption.inlineHints, any>;
|
inlayHints: IEditorOption<EditorOption.inlayHints, any>;
|
||||||
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
|
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
|
||||||
smartSelect: IEditorOption<EditorOption.smartSelect, any>;
|
smartSelect: IEditorOption<EditorOption.smartSelect, any>;
|
||||||
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
||||||
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
||||||
suggest: IEditorOption<EditorOption.suggest, InternalSuggestOptions>;
|
suggest: IEditorOption<EditorOption.suggest, InternalSuggestOptions>;
|
||||||
|
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, any>;
|
||||||
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
||||||
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
||||||
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
||||||
|
|
@ -4791,7 +4811,7 @@ declare namespace monaco.editor {
|
||||||
getRawOptions(): IEditorOptions;
|
getRawOptions(): IEditorOptions;
|
||||||
/**
|
/**
|
||||||
* Get value of the current model attached to this editor.
|
* Get value of the current model attached to this editor.
|
||||||
* @see `ITextModel.getValue`
|
* @see {@link ITextModel.getValue}
|
||||||
*/
|
*/
|
||||||
getValue(options?: {
|
getValue(options?: {
|
||||||
preserveBOM: boolean;
|
preserveBOM: boolean;
|
||||||
|
|
@ -4799,7 +4819,7 @@ declare namespace monaco.editor {
|
||||||
}): string;
|
}): string;
|
||||||
/**
|
/**
|
||||||
* Set the value of the current model attached to this editor.
|
* Set the value of the current model attached to this editor.
|
||||||
* @see `ITextModel.setValue`
|
* @see {@link ITextModel.setValue}
|
||||||
*/
|
*/
|
||||||
setValue(newValue: string): void;
|
setValue(newValue: string): void;
|
||||||
/**
|
/**
|
||||||
|
|
@ -4881,7 +4901,7 @@ declare namespace monaco.editor {
|
||||||
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
|
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
|
||||||
/**
|
/**
|
||||||
* All decorations added through this call will get the ownerId of this editor.
|
* 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[];
|
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
||||||
/**
|
/**
|
||||||
|
|
@ -4986,7 +5006,7 @@ declare namespace monaco.editor {
|
||||||
*/
|
*/
|
||||||
export interface IDiffEditor extends IEditor {
|
export interface IDiffEditor extends IEditor {
|
||||||
/**
|
/**
|
||||||
* @see ICodeEditor.getDomNode
|
* @see {@link ICodeEditor.getDomNode}
|
||||||
*/
|
*/
|
||||||
getDomNode(): HTMLElement;
|
getDomNode(): HTMLElement;
|
||||||
/**
|
/**
|
||||||
|
|
@ -5318,6 +5338,11 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
|
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
|
* Contains additional diagnostic information about the context in which
|
||||||
* a [code action](#CodeActionProvider.provideCodeActions) is run.
|
* 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
|
* 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
|
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
|
||||||
* thenable.
|
* thenable.
|
||||||
|
|
@ -5708,13 +5733,13 @@ declare namespace monaco.languages {
|
||||||
documentation?: string | IMarkdownString;
|
documentation?: string | IMarkdownString;
|
||||||
/**
|
/**
|
||||||
* A string that should be used when comparing this item
|
* 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.
|
* is used.
|
||||||
*/
|
*/
|
||||||
sortText?: string;
|
sortText?: string;
|
||||||
/**
|
/**
|
||||||
* A string that should be used when filtering a set of
|
* 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.
|
* is used.
|
||||||
*/
|
*/
|
||||||
filterText?: string;
|
filterText?: string;
|
||||||
|
|
@ -5738,11 +5763,11 @@ declare namespace monaco.languages {
|
||||||
/**
|
/**
|
||||||
* A range of text that should be replaced by this completion item.
|
* 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.
|
* current position.
|
||||||
*
|
*
|
||||||
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
|
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
||||||
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
|
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
||||||
*/
|
*/
|
||||||
range: IRange | {
|
range: IRange | {
|
||||||
insert: IRange;
|
insert: IRange;
|
||||||
|
|
@ -5783,7 +5808,7 @@ declare namespace monaco.languages {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains additional information about the context in which
|
* Contains additional information about the context in which
|
||||||
* [completion provider](#CompletionItemProvider.provideCompletionItems) is triggered.
|
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
||||||
*/
|
*/
|
||||||
export interface CompletionContext {
|
export interface CompletionContext {
|
||||||
/**
|
/**
|
||||||
|
|
@ -5804,10 +5829,10 @@ declare namespace monaco.languages {
|
||||||
*
|
*
|
||||||
* When computing *complete* completion items is expensive, providers can optionally implement
|
* When computing *complete* completion items is expensive, providers can optionally implement
|
||||||
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
||||||
* items with a [label](#CompletionItem.label) from the
|
* items with a {@link CompletionItem.label label} from the
|
||||||
* [provideCompletionItems](#CompletionItemProvider.provideCompletionItems)-function. Subsequently,
|
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
|
||||||
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
|
* 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 {
|
export interface CompletionItemProvider {
|
||||||
triggerCharacters?: string[];
|
triggerCharacters?: string[];
|
||||||
|
|
@ -5816,14 +5841,68 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
|
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)
|
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
|
||||||
* or [details](#CompletionItem.detail).
|
* or {@link CompletionItem.detail details}.
|
||||||
*
|
*
|
||||||
* The editor will only resolve a completion item once.
|
* The editor will only resolve a completion item once.
|
||||||
*/
|
*/
|
||||||
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
|
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 {
|
export interface CodeAction {
|
||||||
title: string;
|
title: string;
|
||||||
command?: Command;
|
command?: Command;
|
||||||
|
|
@ -5962,7 +6041,7 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
range: IRange;
|
range: IRange;
|
||||||
/**
|
/**
|
||||||
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
|
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
||||||
*/
|
*/
|
||||||
kind?: DocumentHighlightKind;
|
kind?: DocumentHighlightKind;
|
||||||
}
|
}
|
||||||
|
|
@ -6289,12 +6368,12 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
label: string;
|
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.
|
* this presentation for the color.
|
||||||
*/
|
*/
|
||||||
textEdit?: TextEdit;
|
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.
|
* selecting this color presentation.
|
||||||
*/
|
*/
|
||||||
additionalTextEdits?: TextEdit[];
|
additionalTextEdits?: TextEdit[];
|
||||||
|
|
@ -6366,10 +6445,10 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
end: number;
|
end: number;
|
||||||
/**
|
/**
|
||||||
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
|
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
|
||||||
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
|
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
|
||||||
* like 'Fold all comments'. See
|
* like 'Fold all comments'. See
|
||||||
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
|
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
|
||||||
*/
|
*/
|
||||||
kind?: FoldingRangeKind;
|
kind?: FoldingRangeKind;
|
||||||
}
|
}
|
||||||
|
|
@ -6390,7 +6469,7 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
static readonly Region: FoldingRangeKind;
|
static readonly Region: FoldingRangeKind;
|
||||||
/**
|
/**
|
||||||
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
|
* Creates a new {@link FoldingRangeKind}.
|
||||||
*
|
*
|
||||||
* @param value of the kind.
|
* @param value of the kind.
|
||||||
*/
|
*/
|
||||||
|
|
@ -6470,24 +6549,23 @@ declare namespace monaco.languages {
|
||||||
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InlineHintKind {
|
export enum InlayHintKind {
|
||||||
Other = 0,
|
Other = 0,
|
||||||
Type = 1,
|
Type = 1,
|
||||||
Parameter = 2
|
Parameter = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InlineHint {
|
export interface InlayHint {
|
||||||
text: string;
|
text: string;
|
||||||
range: IRange;
|
position: IPosition;
|
||||||
kind: InlineHintKind;
|
kind: InlayHintKind;
|
||||||
description?: string | IMarkdownString;
|
|
||||||
whitespaceBefore?: boolean;
|
whitespaceBefore?: boolean;
|
||||||
whitespaceAfter?: boolean;
|
whitespaceAfter?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InlineHintsProvider {
|
export interface InlayHintsProvider {
|
||||||
onDidChangeInlineHints?: IEvent<void> | undefined;
|
onDidChangeInlayHints?: IEvent<void> | undefined;
|
||||||
provideInlineHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlineHint[]>;
|
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SemanticTokensLegend {
|
export interface SemanticTokensLegend {
|
||||||
|
|
@ -7129,7 +7207,7 @@ declare namespace monaco.languages.typescript {
|
||||||
|
|
||||||
|
|
||||||
declare namespace monaco.languages.css {
|
declare namespace monaco.languages.css {
|
||||||
export interface DiagnosticsOptions {
|
export interface Options {
|
||||||
readonly validate?: boolean;
|
readonly validate?: boolean;
|
||||||
readonly lint?: {
|
readonly lint?: {
|
||||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||||
|
|
@ -7151,6 +7229,10 @@ declare namespace monaco.languages.css {
|
||||||
readonly float?: 'ignore' | 'warning' | 'error';
|
readonly float?: 'ignore' | 'warning' | 'error';
|
||||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Configures the CSS data types known by the langauge service.
|
||||||
|
*/
|
||||||
|
readonly data?: CSSDataConfiguration;
|
||||||
}
|
}
|
||||||
export interface ModeConfiguration {
|
export interface ModeConfiguration {
|
||||||
/**
|
/**
|
||||||
|
|
@ -7201,14 +7283,92 @@ declare namespace monaco.languages.css {
|
||||||
export interface LanguageServiceDefaults {
|
export interface LanguageServiceDefaults {
|
||||||
readonly languageId: string;
|
readonly languageId: string;
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
||||||
readonly modeConfiguration: ModeConfiguration;
|
readonly modeConfiguration: ModeConfiguration;
|
||||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
readonly options: Options;
|
||||||
|
setOptions(options: Options): void;
|
||||||
setModeConfiguration(modeConfiguration: ModeConfiguration): 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 cssDefaults: LanguageServiceDefaults;
|
||||||
export const scssDefaults: LanguageServiceDefaults;
|
export const scssDefaults: LanguageServiceDefaults;
|
||||||
export const lessDefaults: 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';
|
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||||
}
|
}
|
||||||
export interface CompletionConfiguration {
|
export interface CompletionConfiguration {
|
||||||
[provider: string]: boolean;
|
[providerId: string]: boolean;
|
||||||
}
|
}
|
||||||
export interface Options {
|
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.
|
* A list of known schemas and/or associations of schemas to file names.
|
||||||
*/
|
*/
|
||||||
readonly suggest?: CompletionConfiguration;
|
readonly suggest?: CompletionConfiguration;
|
||||||
|
/**
|
||||||
|
* Configures the HTML data types known by the HTML langauge service.
|
||||||
|
*/
|
||||||
|
readonly data?: HTMLDataConfiguration;
|
||||||
}
|
}
|
||||||
export interface ModeConfiguration {
|
export interface ModeConfiguration {
|
||||||
/**
|
/**
|
||||||
|
|
@ -7414,8 +7578,80 @@ declare namespace monaco.languages.html {
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
readonly options: Options;
|
readonly options: Options;
|
||||||
setOptions(options: Options): void;
|
setOptions(options: Options): void;
|
||||||
|
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||||
}
|
}
|
||||||
|
export const htmlLanguageService: LanguageServiceRegistration;
|
||||||
export const htmlDefaults: LanguageServiceDefaults;
|
export const htmlDefaults: LanguageServiceDefaults;
|
||||||
|
export const handlebarLanguageService: LanguageServiceRegistration;
|
||||||
export const handlebarDefaults: LanguageServiceDefaults;
|
export const handlebarDefaults: LanguageServiceDefaults;
|
||||||
|
export const razorLanguageService: LanguageServiceRegistration;
|
||||||
export const razorDefaults: LanguageServiceDefaults;
|
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 options.
|
||||||
*/
|
*/
|
||||||
suggest?: ISuggestOptions;
|
suggest?: ISuggestOptions;
|
||||||
|
inlineSuggest?: IInlineSuggestOptions;
|
||||||
/**
|
/**
|
||||||
* Smart select options.
|
* Smart select options.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3233,7 +3234,7 @@ declare namespace monaco.editor {
|
||||||
/**
|
/**
|
||||||
* Control the behavior and rendering of the inline hints.
|
* Control the behavior and rendering of the inline hints.
|
||||||
*/
|
*/
|
||||||
inlineHints?: IEditorInlineHintsOptions;
|
inlayHints?: IEditorInlayHintsOptions;
|
||||||
/**
|
/**
|
||||||
* Control if the editor should use shadow DOM.
|
* Control if the editor should use shadow DOM.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3598,9 +3599,9 @@ declare namespace monaco.editor {
|
||||||
export type EditorLightbulbOptions = Readonly<Required<IEditorLightbulbOptions>>;
|
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.
|
* Enable the inline hints.
|
||||||
* Defaults to true.
|
* Defaults to true.
|
||||||
|
|
@ -3618,7 +3619,7 @@ declare namespace monaco.editor {
|
||||||
fontFamily?: string;
|
fontFamily?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EditorInlineHintsOptions = Readonly<Required<IEditorInlineHintsOptions>>;
|
export type EditorInlayHintsOptions = Readonly<Required<IEditorInlayHintsOptions>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration options for editor minimap
|
* Configuration options for editor minimap
|
||||||
|
|
@ -3817,6 +3818,15 @@ declare namespace monaco.editor {
|
||||||
readonly scrollByPage: boolean;
|
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
|
* Configuration options for editor suggest widget
|
||||||
*/
|
*/
|
||||||
|
|
@ -3849,6 +3859,10 @@ declare namespace monaco.editor {
|
||||||
* Enable or disable the suggest status bar.
|
* Enable or disable the suggest status bar.
|
||||||
*/
|
*/
|
||||||
showStatusBar?: boolean;
|
showStatusBar?: boolean;
|
||||||
|
/**
|
||||||
|
* Enable or disable the rendering of the suggestion preview.
|
||||||
|
*/
|
||||||
|
preview?: boolean;
|
||||||
/**
|
/**
|
||||||
* Show details inline with the label. Defaults to true.
|
* Show details inline with the label. Defaults to true.
|
||||||
*/
|
*/
|
||||||
|
|
@ -3865,6 +3879,10 @@ declare namespace monaco.editor {
|
||||||
* Show constructor-suggestions.
|
* Show constructor-suggestions.
|
||||||
*/
|
*/
|
||||||
showConstructors?: boolean;
|
showConstructors?: boolean;
|
||||||
|
/**
|
||||||
|
* Show deprecated-suggestions.
|
||||||
|
*/
|
||||||
|
showDeprecated?: boolean;
|
||||||
/**
|
/**
|
||||||
* Show field-suggestions.
|
* Show field-suggestions.
|
||||||
*/
|
*/
|
||||||
|
|
@ -4053,83 +4071,84 @@ declare namespace monaco.editor {
|
||||||
highlightActiveIndentGuide = 49,
|
highlightActiveIndentGuide = 49,
|
||||||
hover = 50,
|
hover = 50,
|
||||||
inDiffEditor = 51,
|
inDiffEditor = 51,
|
||||||
letterSpacing = 52,
|
inlineSuggest = 52,
|
||||||
lightbulb = 53,
|
letterSpacing = 53,
|
||||||
lineDecorationsWidth = 54,
|
lightbulb = 54,
|
||||||
lineHeight = 55,
|
lineDecorationsWidth = 55,
|
||||||
lineNumbers = 56,
|
lineHeight = 56,
|
||||||
lineNumbersMinChars = 57,
|
lineNumbers = 57,
|
||||||
linkedEditing = 58,
|
lineNumbersMinChars = 58,
|
||||||
links = 59,
|
linkedEditing = 59,
|
||||||
matchBrackets = 60,
|
links = 60,
|
||||||
minimap = 61,
|
matchBrackets = 61,
|
||||||
mouseStyle = 62,
|
minimap = 62,
|
||||||
mouseWheelScrollSensitivity = 63,
|
mouseStyle = 63,
|
||||||
mouseWheelZoom = 64,
|
mouseWheelScrollSensitivity = 64,
|
||||||
multiCursorMergeOverlapping = 65,
|
mouseWheelZoom = 65,
|
||||||
multiCursorModifier = 66,
|
multiCursorMergeOverlapping = 66,
|
||||||
multiCursorPaste = 67,
|
multiCursorModifier = 67,
|
||||||
occurrencesHighlight = 68,
|
multiCursorPaste = 68,
|
||||||
overviewRulerBorder = 69,
|
occurrencesHighlight = 69,
|
||||||
overviewRulerLanes = 70,
|
overviewRulerBorder = 70,
|
||||||
padding = 71,
|
overviewRulerLanes = 71,
|
||||||
parameterHints = 72,
|
padding = 72,
|
||||||
peekWidgetDefaultFocus = 73,
|
parameterHints = 73,
|
||||||
definitionLinkOpensInPeek = 74,
|
peekWidgetDefaultFocus = 74,
|
||||||
quickSuggestions = 75,
|
definitionLinkOpensInPeek = 75,
|
||||||
quickSuggestionsDelay = 76,
|
quickSuggestions = 76,
|
||||||
readOnly = 77,
|
quickSuggestionsDelay = 77,
|
||||||
renameOnType = 78,
|
readOnly = 78,
|
||||||
renderControlCharacters = 79,
|
renameOnType = 79,
|
||||||
renderIndentGuides = 80,
|
renderControlCharacters = 80,
|
||||||
renderFinalNewline = 81,
|
renderIndentGuides = 81,
|
||||||
renderLineHighlight = 82,
|
renderFinalNewline = 82,
|
||||||
renderLineHighlightOnlyWhenFocus = 83,
|
renderLineHighlight = 83,
|
||||||
renderValidationDecorations = 84,
|
renderLineHighlightOnlyWhenFocus = 84,
|
||||||
renderWhitespace = 85,
|
renderValidationDecorations = 85,
|
||||||
revealHorizontalRightPadding = 86,
|
renderWhitespace = 86,
|
||||||
roundedSelection = 87,
|
revealHorizontalRightPadding = 87,
|
||||||
rulers = 88,
|
roundedSelection = 88,
|
||||||
scrollbar = 89,
|
rulers = 89,
|
||||||
scrollBeyondLastColumn = 90,
|
scrollbar = 90,
|
||||||
scrollBeyondLastLine = 91,
|
scrollBeyondLastColumn = 91,
|
||||||
scrollPredominantAxis = 92,
|
scrollBeyondLastLine = 92,
|
||||||
selectionClipboard = 93,
|
scrollPredominantAxis = 93,
|
||||||
selectionHighlight = 94,
|
selectionClipboard = 94,
|
||||||
selectOnLineNumbers = 95,
|
selectionHighlight = 95,
|
||||||
showFoldingControls = 96,
|
selectOnLineNumbers = 96,
|
||||||
showUnused = 97,
|
showFoldingControls = 97,
|
||||||
snippetSuggestions = 98,
|
showUnused = 98,
|
||||||
smartSelect = 99,
|
snippetSuggestions = 99,
|
||||||
smoothScrolling = 100,
|
smartSelect = 100,
|
||||||
stickyTabStops = 101,
|
smoothScrolling = 101,
|
||||||
stopRenderingLineAfter = 102,
|
stickyTabStops = 102,
|
||||||
suggest = 103,
|
stopRenderingLineAfter = 103,
|
||||||
suggestFontSize = 104,
|
suggest = 104,
|
||||||
suggestLineHeight = 105,
|
suggestFontSize = 105,
|
||||||
suggestOnTriggerCharacters = 106,
|
suggestLineHeight = 106,
|
||||||
suggestSelection = 107,
|
suggestOnTriggerCharacters = 107,
|
||||||
tabCompletion = 108,
|
suggestSelection = 108,
|
||||||
tabIndex = 109,
|
tabCompletion = 109,
|
||||||
unusualLineTerminators = 110,
|
tabIndex = 110,
|
||||||
useShadowDOM = 111,
|
unusualLineTerminators = 111,
|
||||||
useTabStops = 112,
|
useShadowDOM = 112,
|
||||||
wordSeparators = 113,
|
useTabStops = 113,
|
||||||
wordWrap = 114,
|
wordSeparators = 114,
|
||||||
wordWrapBreakAfterCharacters = 115,
|
wordWrap = 115,
|
||||||
wordWrapBreakBeforeCharacters = 116,
|
wordWrapBreakAfterCharacters = 116,
|
||||||
wordWrapColumn = 117,
|
wordWrapBreakBeforeCharacters = 117,
|
||||||
wordWrapOverride1 = 118,
|
wordWrapColumn = 118,
|
||||||
wordWrapOverride2 = 119,
|
wordWrapOverride1 = 119,
|
||||||
wrappingIndent = 120,
|
wordWrapOverride2 = 120,
|
||||||
wrappingStrategy = 121,
|
wrappingIndent = 121,
|
||||||
showDeprecated = 122,
|
wrappingStrategy = 122,
|
||||||
inlineHints = 123,
|
showDeprecated = 123,
|
||||||
editorClassName = 124,
|
inlayHints = 124,
|
||||||
pixelRatio = 125,
|
editorClassName = 125,
|
||||||
tabFocusMode = 126,
|
pixelRatio = 126,
|
||||||
layoutInfo = 127,
|
tabFocusMode = 127,
|
||||||
wrappingInfo = 128
|
layoutInfo = 128,
|
||||||
|
wrappingInfo = 129
|
||||||
}
|
}
|
||||||
export const EditorOptions: {
|
export const EditorOptions: {
|
||||||
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
acceptSuggestionOnCommitCharacter: IEditorOption<EditorOption.acceptSuggestionOnCommitCharacter, boolean>;
|
||||||
|
|
@ -4232,12 +4251,13 @@ declare namespace monaco.editor {
|
||||||
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
|
||||||
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
|
||||||
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
|
||||||
inlineHints: IEditorOption<EditorOption.inlineHints, any>;
|
inlayHints: IEditorOption<EditorOption.inlayHints, any>;
|
||||||
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
|
snippetSuggestions: IEditorOption<EditorOption.snippetSuggestions, 'none' | 'top' | 'bottom' | 'inline'>;
|
||||||
smartSelect: IEditorOption<EditorOption.smartSelect, any>;
|
smartSelect: IEditorOption<EditorOption.smartSelect, any>;
|
||||||
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
smoothScrolling: IEditorOption<EditorOption.smoothScrolling, boolean>;
|
||||||
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
stopRenderingLineAfter: IEditorOption<EditorOption.stopRenderingLineAfter, number>;
|
||||||
suggest: IEditorOption<EditorOption.suggest, InternalSuggestOptions>;
|
suggest: IEditorOption<EditorOption.suggest, InternalSuggestOptions>;
|
||||||
|
inlineSuggest: IEditorOption<EditorOption.inlineSuggest, any>;
|
||||||
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
suggestFontSize: IEditorOption<EditorOption.suggestFontSize, number>;
|
||||||
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
suggestLineHeight: IEditorOption<EditorOption.suggestLineHeight, number>;
|
||||||
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
||||||
|
|
@ -4791,7 +4811,7 @@ declare namespace monaco.editor {
|
||||||
getRawOptions(): IEditorOptions;
|
getRawOptions(): IEditorOptions;
|
||||||
/**
|
/**
|
||||||
* Get value of the current model attached to this editor.
|
* Get value of the current model attached to this editor.
|
||||||
* @see `ITextModel.getValue`
|
* @see {@link ITextModel.getValue}
|
||||||
*/
|
*/
|
||||||
getValue(options?: {
|
getValue(options?: {
|
||||||
preserveBOM: boolean;
|
preserveBOM: boolean;
|
||||||
|
|
@ -4799,7 +4819,7 @@ declare namespace monaco.editor {
|
||||||
}): string;
|
}): string;
|
||||||
/**
|
/**
|
||||||
* Set the value of the current model attached to this editor.
|
* Set the value of the current model attached to this editor.
|
||||||
* @see `ITextModel.setValue`
|
* @see {@link ITextModel.setValue}
|
||||||
*/
|
*/
|
||||||
setValue(newValue: string): void;
|
setValue(newValue: string): void;
|
||||||
/**
|
/**
|
||||||
|
|
@ -4881,7 +4901,7 @@ declare namespace monaco.editor {
|
||||||
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
|
getLineDecorations(lineNumber: number): IModelDecoration[] | null;
|
||||||
/**
|
/**
|
||||||
* All decorations added through this call will get the ownerId of this editor.
|
* 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[];
|
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
|
||||||
/**
|
/**
|
||||||
|
|
@ -4986,7 +5006,7 @@ declare namespace monaco.editor {
|
||||||
*/
|
*/
|
||||||
export interface IDiffEditor extends IEditor {
|
export interface IDiffEditor extends IEditor {
|
||||||
/**
|
/**
|
||||||
* @see ICodeEditor.getDomNode
|
* @see {@link ICodeEditor.getDomNode}
|
||||||
*/
|
*/
|
||||||
getDomNode(): HTMLElement;
|
getDomNode(): HTMLElement;
|
||||||
/**
|
/**
|
||||||
|
|
@ -5318,6 +5338,11 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
|
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
|
* Contains additional diagnostic information about the context in which
|
||||||
* a [code action](#CodeActionProvider.provideCodeActions) is run.
|
* 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
|
* 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
|
* to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
|
||||||
* thenable.
|
* thenable.
|
||||||
|
|
@ -5708,13 +5733,13 @@ declare namespace monaco.languages {
|
||||||
documentation?: string | IMarkdownString;
|
documentation?: string | IMarkdownString;
|
||||||
/**
|
/**
|
||||||
* A string that should be used when comparing this item
|
* 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.
|
* is used.
|
||||||
*/
|
*/
|
||||||
sortText?: string;
|
sortText?: string;
|
||||||
/**
|
/**
|
||||||
* A string that should be used when filtering a set of
|
* 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.
|
* is used.
|
||||||
*/
|
*/
|
||||||
filterText?: string;
|
filterText?: string;
|
||||||
|
|
@ -5738,11 +5763,11 @@ declare namespace monaco.languages {
|
||||||
/**
|
/**
|
||||||
* A range of text that should be replaced by this completion item.
|
* 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.
|
* current position.
|
||||||
*
|
*
|
||||||
* *Note:* The range must be a [single line](#Range.isSingleLine) and it must
|
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must
|
||||||
* [contain](#Range.contains) the position at which completion has been [requested](#CompletionItemProvider.provideCompletionItems).
|
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
||||||
*/
|
*/
|
||||||
range: IRange | {
|
range: IRange | {
|
||||||
insert: IRange;
|
insert: IRange;
|
||||||
|
|
@ -5783,7 +5808,7 @@ declare namespace monaco.languages {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains additional information about the context in which
|
* Contains additional information about the context in which
|
||||||
* [completion provider](#CompletionItemProvider.provideCompletionItems) is triggered.
|
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
||||||
*/
|
*/
|
||||||
export interface CompletionContext {
|
export interface CompletionContext {
|
||||||
/**
|
/**
|
||||||
|
|
@ -5804,10 +5829,10 @@ declare namespace monaco.languages {
|
||||||
*
|
*
|
||||||
* When computing *complete* completion items is expensive, providers can optionally implement
|
* When computing *complete* completion items is expensive, providers can optionally implement
|
||||||
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
* the `resolveCompletionItem`-function. In that case it is enough to return completion
|
||||||
* items with a [label](#CompletionItem.label) from the
|
* items with a {@link CompletionItem.label label} from the
|
||||||
* [provideCompletionItems](#CompletionItemProvider.provideCompletionItems)-function. Subsequently,
|
* {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
|
||||||
* when a completion item is shown in the UI and gains focus this provider is asked to resolve
|
* 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 {
|
export interface CompletionItemProvider {
|
||||||
triggerCharacters?: string[];
|
triggerCharacters?: string[];
|
||||||
|
|
@ -5816,14 +5841,68 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
provideCompletionItems(model: editor.ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
|
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)
|
* Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
|
||||||
* or [details](#CompletionItem.detail).
|
* or {@link CompletionItem.detail details}.
|
||||||
*
|
*
|
||||||
* The editor will only resolve a completion item once.
|
* The editor will only resolve a completion item once.
|
||||||
*/
|
*/
|
||||||
resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
|
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 {
|
export interface CodeAction {
|
||||||
title: string;
|
title: string;
|
||||||
command?: Command;
|
command?: Command;
|
||||||
|
|
@ -5962,7 +6041,7 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
range: IRange;
|
range: IRange;
|
||||||
/**
|
/**
|
||||||
* The highlight kind, default is [text](#DocumentHighlightKind.Text).
|
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
||||||
*/
|
*/
|
||||||
kind?: DocumentHighlightKind;
|
kind?: DocumentHighlightKind;
|
||||||
}
|
}
|
||||||
|
|
@ -6289,12 +6368,12 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
label: string;
|
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.
|
* this presentation for the color.
|
||||||
*/
|
*/
|
||||||
textEdit?: TextEdit;
|
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.
|
* selecting this color presentation.
|
||||||
*/
|
*/
|
||||||
additionalTextEdits?: TextEdit[];
|
additionalTextEdits?: TextEdit[];
|
||||||
|
|
@ -6366,10 +6445,10 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
end: number;
|
end: number;
|
||||||
/**
|
/**
|
||||||
* Describes the [Kind](#FoldingRangeKind) of the folding range such as [Comment](#FoldingRangeKind.Comment) or
|
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
|
||||||
* [Region](#FoldingRangeKind.Region). The kind is used to categorize folding ranges and used by commands
|
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
|
||||||
* like 'Fold all comments'. See
|
* like 'Fold all comments'. See
|
||||||
* [FoldingRangeKind](#FoldingRangeKind) for an enumeration of standardized kinds.
|
* {@link FoldingRangeKind} for an enumeration of standardized kinds.
|
||||||
*/
|
*/
|
||||||
kind?: FoldingRangeKind;
|
kind?: FoldingRangeKind;
|
||||||
}
|
}
|
||||||
|
|
@ -6390,7 +6469,7 @@ declare namespace monaco.languages {
|
||||||
*/
|
*/
|
||||||
static readonly Region: FoldingRangeKind;
|
static readonly Region: FoldingRangeKind;
|
||||||
/**
|
/**
|
||||||
* Creates a new [FoldingRangeKind](#FoldingRangeKind).
|
* Creates a new {@link FoldingRangeKind}.
|
||||||
*
|
*
|
||||||
* @param value of the kind.
|
* @param value of the kind.
|
||||||
*/
|
*/
|
||||||
|
|
@ -6470,24 +6549,23 @@ declare namespace monaco.languages {
|
||||||
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
resolveCodeLens?(model: editor.ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InlineHintKind {
|
export enum InlayHintKind {
|
||||||
Other = 0,
|
Other = 0,
|
||||||
Type = 1,
|
Type = 1,
|
||||||
Parameter = 2
|
Parameter = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InlineHint {
|
export interface InlayHint {
|
||||||
text: string;
|
text: string;
|
||||||
range: IRange;
|
position: IPosition;
|
||||||
kind: InlineHintKind;
|
kind: InlayHintKind;
|
||||||
description?: string | IMarkdownString;
|
|
||||||
whitespaceBefore?: boolean;
|
whitespaceBefore?: boolean;
|
||||||
whitespaceAfter?: boolean;
|
whitespaceAfter?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InlineHintsProvider {
|
export interface InlayHintsProvider {
|
||||||
onDidChangeInlineHints?: IEvent<void> | undefined;
|
onDidChangeInlayHints?: IEvent<void> | undefined;
|
||||||
provideInlineHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlineHint[]>;
|
provideInlayHints(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHint[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SemanticTokensLegend {
|
export interface SemanticTokensLegend {
|
||||||
|
|
@ -7129,7 +7207,7 @@ declare namespace monaco.languages.typescript {
|
||||||
|
|
||||||
|
|
||||||
declare namespace monaco.languages.css {
|
declare namespace monaco.languages.css {
|
||||||
export interface DiagnosticsOptions {
|
export interface Options {
|
||||||
readonly validate?: boolean;
|
readonly validate?: boolean;
|
||||||
readonly lint?: {
|
readonly lint?: {
|
||||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||||
|
|
@ -7151,6 +7229,10 @@ declare namespace monaco.languages.css {
|
||||||
readonly float?: 'ignore' | 'warning' | 'error';
|
readonly float?: 'ignore' | 'warning' | 'error';
|
||||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Configures the CSS data types known by the langauge service.
|
||||||
|
*/
|
||||||
|
readonly data?: CSSDataConfiguration;
|
||||||
}
|
}
|
||||||
export interface ModeConfiguration {
|
export interface ModeConfiguration {
|
||||||
/**
|
/**
|
||||||
|
|
@ -7201,14 +7283,92 @@ declare namespace monaco.languages.css {
|
||||||
export interface LanguageServiceDefaults {
|
export interface LanguageServiceDefaults {
|
||||||
readonly languageId: string;
|
readonly languageId: string;
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
||||||
readonly modeConfiguration: ModeConfiguration;
|
readonly modeConfiguration: ModeConfiguration;
|
||||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
readonly options: Options;
|
||||||
|
setOptions(options: Options): void;
|
||||||
setModeConfiguration(modeConfiguration: ModeConfiguration): 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 cssDefaults: LanguageServiceDefaults;
|
||||||
export const scssDefaults: LanguageServiceDefaults;
|
export const scssDefaults: LanguageServiceDefaults;
|
||||||
export const lessDefaults: 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';
|
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||||
}
|
}
|
||||||
export interface CompletionConfiguration {
|
export interface CompletionConfiguration {
|
||||||
[provider: string]: boolean;
|
[providerId: string]: boolean;
|
||||||
}
|
}
|
||||||
export interface Options {
|
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.
|
* A list of known schemas and/or associations of schemas to file names.
|
||||||
*/
|
*/
|
||||||
readonly suggest?: CompletionConfiguration;
|
readonly suggest?: CompletionConfiguration;
|
||||||
|
/**
|
||||||
|
* Configures the HTML data types known by the HTML langauge service.
|
||||||
|
*/
|
||||||
|
readonly data?: HTMLDataConfiguration;
|
||||||
}
|
}
|
||||||
export interface ModeConfiguration {
|
export interface ModeConfiguration {
|
||||||
/**
|
/**
|
||||||
|
|
@ -7414,8 +7578,80 @@ declare namespace monaco.languages.html {
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
readonly options: Options;
|
readonly options: Options;
|
||||||
setOptions(options: Options): void;
|
setOptions(options: Options): void;
|
||||||
|
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||||
}
|
}
|
||||||
|
export const htmlLanguageService: LanguageServiceRegistration;
|
||||||
export const htmlDefaults: LanguageServiceDefaults;
|
export const htmlDefaults: LanguageServiceDefaults;
|
||||||
|
export const handlebarLanguageService: LanguageServiceRegistration;
|
||||||
export const handlebarDefaults: LanguageServiceDefaults;
|
export const handlebarDefaults: LanguageServiceDefaults;
|
||||||
|
export const razorLanguageService: LanguageServiceRegistration;
|
||||||
export const razorDefaults: LanguageServiceDefaults;
|
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…
Add table
Add a link
Reference in a new issue