Add changelog entry for 0.31.0

This commit is contained in:
Alex Dima 2021-12-10 22:58:25 +01:00
parent 252e010eb7
commit 3afc60f1ac
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
6 changed files with 171 additions and 101 deletions

View file

@ -1,5 +1,26 @@
# Monaco Editor Changelog # Monaco Editor Changelog
## [0.31.0] (10.12.2021)
- adds support for [highlighting non basic ASCII, invisible or ambiguous unicode characters](https://code.visualstudio.com/updates/v1_63#_unicode-highlighting).
- adds support for setting an editor banner
- streaming hover results in case of multiple hover providers
- fixes multiple IME issues
### Thank you
- [@activeguild (j1ngzoue)](https://github.com/activeguild): Add 'browser-ems-vite-react' sample [PR #2767](https://github.com/microsoft/monaco-editor/pull/2767)
- [@emojiiii (C.Y.Kun)](https://github.com/emojiiii): Fix some errors on the website playground [PR #2779](https://github.com/microsoft/monaco-editor/pull/2779)
- [@gitpaladin (Chen Minglong)](https://github.com/gitpaladin): Fix token while missing `syntax=` directive [PR #2809](https://github.com/microsoft/monaco-editor/pull/2809)
- [@jonatanklosko (Jonatan Kłosko)](https://github.com/jonatanklosko): Update Elixir tokenization of sigil modifiers [PR #2806](https://github.com/microsoft/monaco-editor/pull/2806)
- [@MasterOdin (Matthew Peveler)](https://github.com/MasterOdin)
- Update builtin functions for mysql [PR #2749](https://github.com/microsoft/monaco-editor/pull/2749)
- Update list of keywords for redshift [PR #2757](https://github.com/microsoft/monaco-editor/pull/2757)
- Remove return from example addAction [PR #2772](https://github.com/microsoft/monaco-editor/pull/2772)
- [@milahu](https://github.com/milahu): fix link to monaco.d.ts [PR #2769](https://github.com/microsoft/monaco-editor/pull/2769)
- [@Pranomvignesh (Pranom Vignesh)](https://github.com/Pranomvignesh): Semantic Tokens Provider Sample is broken in docs [PR #2764](https://github.com/microsoft/monaco-editor/pull/2764)
- [@rramo012 (Rafael Ramos)](https://github.com/rramo012): Fixing the documentation links [PR #2748](https://github.com/microsoft/monaco-editor/pull/2748)
## [0.30.1] (09.11.2021) ## [0.30.1] (09.11.2021)
- Fixes [a performance regression where all languages would be loaded when loading the first language](https://github.com/microsoft/monaco-editor/issues/2750). - Fixes [a performance regression where all languages would be loaded when loading the first language](https://github.com/microsoft/monaco-editor/issues/2750).

View file

@ -11,45 +11,16 @@
## Shipping a new monaco-editor npm module ## Shipping a new monaco-editor npm module
#### 0. - update `package.json` and bump `"version"` as necessary
- update `package.json` and edit `"vscode"` to point to the vscode repo commit that should be shipped at `monaco-editor-core` (both `monaco-editor-core` and `monaco-editor` will be published under the same version defined in `package.json`).
- make sure you have `https://github.com/microsoft/vscode-loc` checked out next to the `vscode` folder. - trigger a build using [`Publish to npm`](https://github.com/microsoft/monaco-editor/actions/workflows/publish.yml) and type false when asked "is nightly?"
- if the publish succeeded, run `git tag 0.x.y` and `git push origin 0.x.y`
#### 1. Ship a new `monaco-editor-core` npm module - edit `package.json` and update the `"monaco-editor-core"` dev dependency.
- run `npm install`
- bump version in `/src/vscode/build/monaco/package.json` - run `npm run release`
- **[important]** push all local changes to the remote to get a good public commit id. - write entry in `CHANGELOG.md`
- generate npm package `/src/vscode> yarn gulp editor-distro` - API Changes / Breaking Changes / New and noteworthy
- publish npm package `/src/vscode/out-monaco-editor-core> npm publish` - Thank you ([use this tool](https://vscode-tools.azurewebsites.net/acknowledgement/))
#### 2. Adopt new `monaco-editor-core` version
- edit `/src/monaco-editor/package.json` and update the version of [`monaco-editor-core`](https://www.npmjs.com/package/monaco-editor-core)
```sh
# fetch latest deps
/src/monaco-editor> npm install .
```
#### 4. Generate and try out the local release
- run the editor smoketest via CI or [manually](#running-the-editor-tests).
#### 5. Update release note.
- API Changes / Breaking Changes / New and noteworthy
- Thank you ([use this tool](https://vscode-tools.azurewebsites.net/))
#### 6. Publish
- `/src/monaco-editor> npm version minor`
- `/src/monaco-editor> npm run release`
- `/src/monaco-editor/release> npm publish`
- `/src/monaco-editor> git push origin v0.50.0`
#### 7. Update Website
- `/src/monaco-editor> npm run website`
#### 8. Publish new webpack plugin #### 8. Publish new webpack plugin

6
package-lock.json generated
View file

@ -1159,9 +1159,9 @@
} }
}, },
"monaco-editor-core": { "monaco-editor-core": {
"version": "0.30.1", "version": "0.31.0",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.30.1.tgz", "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.31.0.tgz",
"integrity": "sha512-WNxfchYafMZXVfysqg/ESW4MtOpYLPaIKrzudNlgwYvfYID+O/nwSZI5X+KxW84roVzHsNgFGyOOesfHFZwYUA==", "integrity": "sha512-7LmacXy6p+kwVoLZu64GLPaM/eg/f4IJoaaJK+X3r5n0yDBxPtHgjVwPvjdgwC1/1RnEiuSlFkPFyvBHugB1Nw==",
"dev": true "dev": true
}, },
"mri": { "mri": {

View file

@ -41,7 +41,7 @@
"jsdom": "^18.1.0", "jsdom": "^18.1.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"mocha": "^9.1.3", "mocha": "^9.1.3",
"monaco-editor-core": "0.30.1", "monaco-editor-core": "0.31.0",
"playwright": "^1.16.3", "playwright": "^1.16.3",
"prettier": "^2.4.1", "prettier": "^2.4.1",
"pretty-quick": "^3.1.1", "pretty-quick": "^3.1.1",

View file

@ -807,6 +807,10 @@ declare namespace monaco {
* Get the position at `positionLineNumber` and `positionColumn`. * Get the position at `positionLineNumber` and `positionColumn`.
*/ */
getPosition(): Position; getPosition(): Position;
/**
* Get the position at the start of the selection.
*/
getSelectionStart(): Position;
/** /**
* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
*/ */
@ -815,6 +819,10 @@ declare namespace monaco {
* Create a `Selection` from one or two positions * Create a `Selection` from one or two positions
*/ */
static fromPositions(start: IPosition, end?: IPosition): Selection; static fromPositions(start: IPosition, end?: IPosition): Selection;
/**
* Creates a `Selection` from a range, given a direction.
*/
static fromRange(range: Range, direction: SelectionDirection): Selection;
/** /**
* Create a `Selection` from an `ISelection`. * Create a `Selection` from an `ISelection`.
*/ */
@ -1804,7 +1812,7 @@ declare namespace monaco.editor {
*/ */
getLineLastNonWhitespaceColumn(lineNumber: number): number; getLineLastNonWhitespaceColumn(lineNumber: number): number;
/** /**
* Create a valid position, * Create a valid position.
*/ */
validatePosition(position: IPosition): Position; validatePosition(position: IPosition): Position;
/** /**
@ -1839,7 +1847,7 @@ declare namespace monaco.editor {
*/ */
getPositionAt(offset: number): Position; getPositionAt(offset: number): Position;
/** /**
* Get a range covering the entire model * Get a range covering the entire model.
*/ */
getFullModelRange(): Range; getFullModelRange(): Range;
/** /**
@ -2954,12 +2962,10 @@ declare namespace monaco.editor {
wrappingStrategy?: 'simple' | 'advanced'; wrappingStrategy?: 'simple' | 'advanced';
/** /**
* Configure word wrapping characters. A break will be introduced before these characters. * Configure word wrapping characters. A break will be introduced before these characters.
* Defaults to '([{‘“〈《「『【〔([{「£¥$£¥+'.
*/ */
wordWrapBreakBeforeCharacters?: string; wordWrapBreakBeforeCharacters?: string;
/** /**
* Configure word wrapping characters. A break will be introduced after these characters. * Configure word wrapping characters. A break will be introduced after these characters.
* Defaults to ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'.
*/ */
wordWrapBreakAfterCharacters?: string; wordWrapBreakAfterCharacters?: string;
/** /**
@ -3298,6 +3304,7 @@ declare namespace monaco.editor {
* Controls the behavior of editor guides. * Controls the behavior of editor guides.
*/ */
guides?: IGuidesOptions; guides?: IGuidesOptions;
unicodeHighlight?: IUnicodeHighlightOptions;
} }
export interface IDiffEditorBaseOptions { export interface IDiffEditorBaseOptions {
@ -3376,6 +3383,16 @@ declare namespace monaco.editor {
readonly id: K1; readonly id: K1;
readonly name: string; readonly name: string;
defaultValue: V; defaultValue: V;
/**
* Might modify `value`.
*/
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
}
export class ApplyUpdateResult<T> {
readonly newValue: T;
readonly didChange: boolean;
constructor(newValue: T, didChange: boolean);
} }
/** /**
@ -3861,6 +3878,22 @@ declare namespace monaco.editor {
readonly scrollByPage: boolean; readonly scrollByPage: boolean;
} }
export type InUntrustedWorkspace = 'inUntrustedWorkspace';
/**
* Configuration options for unicode highlighting.
*/
export interface IUnicodeHighlightOptions {
nonBasicASCII?: boolean | InUntrustedWorkspace;
invisibleCharacters?: boolean;
ambiguousCharacters?: boolean;
includeComments?: boolean | InUntrustedWorkspace;
/**
* A map of allowed characters (true: allowed).
*/
allowedCharacters?: Record<string, true>;
}
export interface IInlineSuggestOptions { export interface IInlineSuggestOptions {
/** /**
* Enable or disable the rendering of automatic inline completions. * Enable or disable the rendering of automatic inline completions.
@ -4215,25 +4248,26 @@ declare namespace monaco.editor {
suggestSelection = 109, suggestSelection = 109,
tabCompletion = 110, tabCompletion = 110,
tabIndex = 111, tabIndex = 111,
unusualLineTerminators = 112, unicodeHighlighting = 112,
useShadowDOM = 113, unusualLineTerminators = 113,
useTabStops = 114, useShadowDOM = 114,
wordSeparators = 115, useTabStops = 115,
wordWrap = 116, wordSeparators = 116,
wordWrapBreakAfterCharacters = 117, wordWrap = 117,
wordWrapBreakBeforeCharacters = 118, wordWrapBreakAfterCharacters = 118,
wordWrapColumn = 119, wordWrapBreakBeforeCharacters = 119,
wordWrapOverride1 = 120, wordWrapColumn = 120,
wordWrapOverride2 = 121, wordWrapOverride1 = 121,
wrappingIndent = 122, wordWrapOverride2 = 122,
wrappingStrategy = 123, wrappingIndent = 123,
showDeprecated = 124, wrappingStrategy = 124,
inlayHints = 125, showDeprecated = 125,
editorClassName = 126, inlayHints = 126,
pixelRatio = 127, editorClassName = 127,
tabFocusMode = 128, pixelRatio = 128,
layoutInfo = 129, tabFocusMode = 129,
wrappingInfo = 130 layoutInfo = 130,
wrappingInfo = 131
} }
export const EditorOptions: { export const EditorOptions: {
@ -4351,6 +4385,7 @@ declare namespace monaco.editor {
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>; suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>; tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
tabIndex: IEditorOption<EditorOption.tabIndex, number>; tabIndex: IEditorOption<EditorOption.tabIndex, number>;
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>; unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>; useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>; useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
@ -5097,6 +5132,7 @@ declare namespace monaco.editor {
* Apply the same font settings as the editor to `target`. * Apply the same font settings as the editor to `target`.
*/ */
applyFontInfo(target: HTMLElement): void; applyFontInfo(target: HTMLElement): void;
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
} }
/** /**
@ -5822,6 +5858,11 @@ declare namespace monaco.languages {
InsertAsSnippet = 4 InsertAsSnippet = 4
} }
export interface CompletionItemRanges {
insert: IRange;
replace: IRange;
}
/** /**
* A completion item represents a text snippet that is * A completion item represents a text snippet that is
* proposed to complete text that is being typed. * proposed to complete text that is being typed.
@ -5873,11 +5914,10 @@ declare namespace monaco.languages {
/** /**
* A string or snippet that should be inserted in a document when selecting * A string or snippet that should be inserted in a document when selecting
* this completion. * this completion.
* is used.
*/ */
insertText: string; insertText: string;
/** /**
* Addition rules (as bitmask) that should be applied when inserting * Additional rules (as bitmask) that should be applied when inserting
* this completion. * this completion.
*/ */
insertTextRules?: CompletionItemInsertTextRule; insertTextRules?: CompletionItemInsertTextRule;
@ -5890,10 +5930,7 @@ declare namespace monaco.languages {
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must * *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}. * {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
*/ */
range: IRange | { range: IRange | CompletionItemRanges;
insert: IRange;
replace: IRange;
};
/** /**
* An optional set of characters that when pressed while this completion is active will accept it first and * An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous * then type that character. *Note* that all commit characters should have `length=1` and that superfluous
@ -5997,6 +6034,8 @@ declare namespace monaco.languages {
export interface SelectedSuggestionInfo { export interface SelectedSuggestionInfo {
range: IRange; range: IRange;
text: string; text: string;
isSnippetText: boolean;
completionKind: CompletionItemKind;
} }
export interface InlineCompletion { export interface InlineCompletion {

View file

@ -807,6 +807,10 @@ declare namespace monaco {
* Get the position at `positionLineNumber` and `positionColumn`. * Get the position at `positionLineNumber` and `positionColumn`.
*/ */
getPosition(): Position; getPosition(): Position;
/**
* Get the position at the start of the selection.
*/
getSelectionStart(): Position;
/** /**
* Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
*/ */
@ -815,6 +819,10 @@ declare namespace monaco {
* Create a `Selection` from one or two positions * Create a `Selection` from one or two positions
*/ */
static fromPositions(start: IPosition, end?: IPosition): Selection; static fromPositions(start: IPosition, end?: IPosition): Selection;
/**
* Creates a `Selection` from a range, given a direction.
*/
static fromRange(range: Range, direction: SelectionDirection): Selection;
/** /**
* Create a `Selection` from an `ISelection`. * Create a `Selection` from an `ISelection`.
*/ */
@ -1804,7 +1812,7 @@ declare namespace monaco.editor {
*/ */
getLineLastNonWhitespaceColumn(lineNumber: number): number; getLineLastNonWhitespaceColumn(lineNumber: number): number;
/** /**
* Create a valid position, * Create a valid position.
*/ */
validatePosition(position: IPosition): Position; validatePosition(position: IPosition): Position;
/** /**
@ -1839,7 +1847,7 @@ declare namespace monaco.editor {
*/ */
getPositionAt(offset: number): Position; getPositionAt(offset: number): Position;
/** /**
* Get a range covering the entire model * Get a range covering the entire model.
*/ */
getFullModelRange(): Range; getFullModelRange(): Range;
/** /**
@ -2954,12 +2962,10 @@ declare namespace monaco.editor {
wrappingStrategy?: 'simple' | 'advanced'; wrappingStrategy?: 'simple' | 'advanced';
/** /**
* Configure word wrapping characters. A break will be introduced before these characters. * Configure word wrapping characters. A break will be introduced before these characters.
* Defaults to '([{‘“〈《「『【〔([{「£¥$£¥+'.
*/ */
wordWrapBreakBeforeCharacters?: string; wordWrapBreakBeforeCharacters?: string;
/** /**
* Configure word wrapping characters. A break will be introduced after these characters. * Configure word wrapping characters. A break will be introduced after these characters.
* Defaults to ' \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」'.
*/ */
wordWrapBreakAfterCharacters?: string; wordWrapBreakAfterCharacters?: string;
/** /**
@ -3298,6 +3304,7 @@ declare namespace monaco.editor {
* Controls the behavior of editor guides. * Controls the behavior of editor guides.
*/ */
guides?: IGuidesOptions; guides?: IGuidesOptions;
unicodeHighlight?: IUnicodeHighlightOptions;
} }
export interface IDiffEditorBaseOptions { export interface IDiffEditorBaseOptions {
@ -3376,6 +3383,16 @@ declare namespace monaco.editor {
readonly id: K1; readonly id: K1;
readonly name: string; readonly name: string;
defaultValue: V; defaultValue: V;
/**
* Might modify `value`.
*/
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
}
export class ApplyUpdateResult<T> {
readonly newValue: T;
readonly didChange: boolean;
constructor(newValue: T, didChange: boolean);
} }
/** /**
@ -3861,6 +3878,22 @@ declare namespace monaco.editor {
readonly scrollByPage: boolean; readonly scrollByPage: boolean;
} }
export type InUntrustedWorkspace = 'inUntrustedWorkspace';
/**
* Configuration options for unicode highlighting.
*/
export interface IUnicodeHighlightOptions {
nonBasicASCII?: boolean | InUntrustedWorkspace;
invisibleCharacters?: boolean;
ambiguousCharacters?: boolean;
includeComments?: boolean | InUntrustedWorkspace;
/**
* A map of allowed characters (true: allowed).
*/
allowedCharacters?: Record<string, true>;
}
export interface IInlineSuggestOptions { export interface IInlineSuggestOptions {
/** /**
* Enable or disable the rendering of automatic inline completions. * Enable or disable the rendering of automatic inline completions.
@ -4215,25 +4248,26 @@ declare namespace monaco.editor {
suggestSelection = 109, suggestSelection = 109,
tabCompletion = 110, tabCompletion = 110,
tabIndex = 111, tabIndex = 111,
unusualLineTerminators = 112, unicodeHighlighting = 112,
useShadowDOM = 113, unusualLineTerminators = 113,
useTabStops = 114, useShadowDOM = 114,
wordSeparators = 115, useTabStops = 115,
wordWrap = 116, wordSeparators = 116,
wordWrapBreakAfterCharacters = 117, wordWrap = 117,
wordWrapBreakBeforeCharacters = 118, wordWrapBreakAfterCharacters = 118,
wordWrapColumn = 119, wordWrapBreakBeforeCharacters = 119,
wordWrapOverride1 = 120, wordWrapColumn = 120,
wordWrapOverride2 = 121, wordWrapOverride1 = 121,
wrappingIndent = 122, wordWrapOverride2 = 122,
wrappingStrategy = 123, wrappingIndent = 123,
showDeprecated = 124, wrappingStrategy = 124,
inlayHints = 125, showDeprecated = 125,
editorClassName = 126, inlayHints = 126,
pixelRatio = 127, editorClassName = 127,
tabFocusMode = 128, pixelRatio = 128,
layoutInfo = 129, tabFocusMode = 129,
wrappingInfo = 130 layoutInfo = 130,
wrappingInfo = 131
} }
export const EditorOptions: { export const EditorOptions: {
@ -4351,6 +4385,7 @@ declare namespace monaco.editor {
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>; suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>; tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
tabIndex: IEditorOption<EditorOption.tabIndex, number>; tabIndex: IEditorOption<EditorOption.tabIndex, number>;
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>; unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>; useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>; useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
@ -5097,6 +5132,7 @@ declare namespace monaco.editor {
* Apply the same font settings as the editor to `target`. * Apply the same font settings as the editor to `target`.
*/ */
applyFontInfo(target: HTMLElement): void; applyFontInfo(target: HTMLElement): void;
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
} }
/** /**
@ -5822,6 +5858,11 @@ declare namespace monaco.languages {
InsertAsSnippet = 4 InsertAsSnippet = 4
} }
export interface CompletionItemRanges {
insert: IRange;
replace: IRange;
}
/** /**
* A completion item represents a text snippet that is * A completion item represents a text snippet that is
* proposed to complete text that is being typed. * proposed to complete text that is being typed.
@ -5873,11 +5914,10 @@ declare namespace monaco.languages {
/** /**
* A string or snippet that should be inserted in a document when selecting * A string or snippet that should be inserted in a document when selecting
* this completion. * this completion.
* is used.
*/ */
insertText: string; insertText: string;
/** /**
* Addition rules (as bitmask) that should be applied when inserting * Additional rules (as bitmask) that should be applied when inserting
* this completion. * this completion.
*/ */
insertTextRules?: CompletionItemInsertTextRule; insertTextRules?: CompletionItemInsertTextRule;
@ -5890,10 +5930,7 @@ declare namespace monaco.languages {
* *Note:* The range must be a {@link Range.isSingleLine single line} and it must * *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}. * {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
*/ */
range: IRange | { range: IRange | CompletionItemRanges;
insert: IRange;
replace: IRange;
};
/** /**
* An optional set of characters that when pressed while this completion is active will accept it first and * An optional set of characters that when pressed while this completion is active will accept it first and
* then type that character. *Note* that all commit characters should have `length=1` and that superfluous * then type that character. *Note* that all commit characters should have `length=1` and that superfluous
@ -5997,6 +6034,8 @@ declare namespace monaco.languages {
export interface SelectedSuggestionInfo { export interface SelectedSuggestionInfo {
range: IRange; range: IRange;
text: string; text: string;
isSnippetText: boolean;
completionKind: CompletionItemKind;
} }
export interface InlineCompletion { export interface InlineCompletion {