modern-monaco 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/core.mjs +36 -43
- package/dist/editor-core.mjs +48099 -46106
- package/dist/editor-worker.mjs +308 -441
- package/dist/index.mjs +11 -9
- package/dist/lsp/client.mjs +14 -1
- package/dist/lsp/css/setup.mjs +2 -2
- package/dist/lsp/css/worker.mjs +39 -42
- package/dist/lsp/html/setup.mjs +2 -2
- package/dist/lsp/html/worker.mjs +52 -59
- package/dist/lsp/json/setup.mjs +2 -2
- package/dist/lsp/json/worker.mjs +654 -62
- package/dist/lsp/typescript/libs.mjs +1 -1
- package/dist/lsp/typescript/setup.mjs +8 -7
- package/dist/shiki-wasm.mjs +1 -1
- package/dist/shiki.mjs +40 -22
- package/dist/util.mjs +9 -0
- package/dist/workspace.mjs +15 -27
- package/package.json +10 -10
- package/types/index.d.ts +5 -5
- package/types/monaco.d.ts +147 -122
- package/types/textmate.d.ts +1 -1
- package/types/workspace.d.ts +1 -1
package/types/monaco.d.ts
CHANGED
|
@@ -617,7 +617,7 @@ export class Position {
|
|
|
617
617
|
/**
|
|
618
618
|
* Test if `obj` is an `IPosition`.
|
|
619
619
|
*/
|
|
620
|
-
static isIPosition(obj:
|
|
620
|
+
static isIPosition(obj: unknown): obj is IPosition;
|
|
621
621
|
toJSON(): IPosition;
|
|
622
622
|
}
|
|
623
623
|
|
|
@@ -781,7 +781,7 @@ export class Range {
|
|
|
781
781
|
/**
|
|
782
782
|
* Test if `obj` is an `IRange`.
|
|
783
783
|
*/
|
|
784
|
-
static isIRange(obj:
|
|
784
|
+
static isIRange(obj: unknown): obj is IRange;
|
|
785
785
|
/**
|
|
786
786
|
* Test if the two ranges are touching in any way.
|
|
787
787
|
*/
|
|
@@ -907,7 +907,7 @@ export class Selection extends Range {
|
|
|
907
907
|
/**
|
|
908
908
|
* Test if `obj` is an `ISelection`.
|
|
909
909
|
*/
|
|
910
|
-
static isISelection(obj:
|
|
910
|
+
static isISelection(obj: unknown): obj is ISelection;
|
|
911
911
|
/**
|
|
912
912
|
* Create with a direction.
|
|
913
913
|
*/
|
|
@@ -1222,7 +1222,7 @@ export namespace editor {
|
|
|
1222
1222
|
/**
|
|
1223
1223
|
* An object that can be used by the web worker to make calls back to the main thread.
|
|
1224
1224
|
*/
|
|
1225
|
-
host?:
|
|
1225
|
+
host?: Record<string, Function>;
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Keep idle models.
|
|
1228
1228
|
* Defaults to false, which means that idle models will stop syncing after a while.
|
|
@@ -1272,7 +1272,7 @@ export namespace editor {
|
|
|
1272
1272
|
* Method that will be executed when the action is triggered.
|
|
1273
1273
|
* @param editor The editor instance is passed in as a convenience
|
|
1274
1274
|
*/
|
|
1275
|
-
run(editor: ICodeEditor, ...args:
|
|
1275
|
+
run(editor: ICodeEditor, ...args: unknown[]): void | Promise<void>;
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
1278
|
/**
|
|
@@ -1446,7 +1446,7 @@ export namespace editor {
|
|
|
1446
1446
|
export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;
|
|
1447
1447
|
|
|
1448
1448
|
export interface IEditorOverrideServices {
|
|
1449
|
-
[index: string]:
|
|
1449
|
+
[index: string]: unknown;
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
1452
|
export interface IMarker {
|
|
@@ -2633,7 +2633,7 @@ export namespace editor {
|
|
|
2633
2633
|
cursorState: ICursorState[];
|
|
2634
2634
|
viewState: IViewState;
|
|
2635
2635
|
contributionsState: {
|
|
2636
|
-
[id: string]:
|
|
2636
|
+
[id: string]: unknown;
|
|
2637
2637
|
};
|
|
2638
2638
|
}
|
|
2639
2639
|
|
|
@@ -2848,7 +2848,7 @@ export namespace editor {
|
|
|
2848
2848
|
* @param handlerId The id of the handler or the id of a contribution.
|
|
2849
2849
|
* @param payload Extra data to be sent to the handler.
|
|
2850
2850
|
*/
|
|
2851
|
-
trigger(source: string | null | undefined, handlerId: string, payload:
|
|
2851
|
+
trigger(source: string | null | undefined, handlerId: string, payload: unknown): void;
|
|
2852
2852
|
/**
|
|
2853
2853
|
* Gets the current model attached to this editor.
|
|
2854
2854
|
*/
|
|
@@ -2878,7 +2878,7 @@ export namespace editor {
|
|
|
2878
2878
|
* An event emitted when decorations change in the editor,
|
|
2879
2879
|
* but the change is not caused by us setting or clearing the collection.
|
|
2880
2880
|
*/
|
|
2881
|
-
onDidChange: IEvent<IModelDecorationsChangedEvent>;
|
|
2881
|
+
readonly onDidChange: IEvent<IModelDecorationsChangedEvent>;
|
|
2882
2882
|
/**
|
|
2883
2883
|
* Get the decorations count.
|
|
2884
2884
|
*/
|
|
@@ -2920,11 +2920,11 @@ export namespace editor {
|
|
|
2920
2920
|
/**
|
|
2921
2921
|
* Store view state.
|
|
2922
2922
|
*/
|
|
2923
|
-
saveViewState?():
|
|
2923
|
+
saveViewState?(): unknown;
|
|
2924
2924
|
/**
|
|
2925
2925
|
* Restore view state.
|
|
2926
2926
|
*/
|
|
2927
|
-
restoreViewState?(state:
|
|
2927
|
+
restoreViewState?(state: unknown): void;
|
|
2928
2928
|
}
|
|
2929
2929
|
|
|
2930
2930
|
/**
|
|
@@ -3610,6 +3610,10 @@ export namespace editor {
|
|
|
3610
3610
|
* Controls the max number of text cursors that can be in an active editor at once.
|
|
3611
3611
|
*/
|
|
3612
3612
|
multiCursorLimit?: number;
|
|
3613
|
+
/**
|
|
3614
|
+
* Enables middle mouse button to open links and Go To Definition
|
|
3615
|
+
*/
|
|
3616
|
+
mouseMiddleClickAction?: MouseMiddleClickAction;
|
|
3613
3617
|
/**
|
|
3614
3618
|
* Configure the editor's accessibility support.
|
|
3615
3619
|
* Defaults to 'auto'. It is best to leave this to 'auto'.
|
|
@@ -4768,6 +4772,7 @@ export namespace editor {
|
|
|
4768
4772
|
syntaxHighlightingEnabled?: boolean;
|
|
4769
4773
|
suppressSuggestions?: boolean;
|
|
4770
4774
|
minShowDelay?: number;
|
|
4775
|
+
suppressInSnippetMode?: boolean;
|
|
4771
4776
|
/**
|
|
4772
4777
|
* Does not clear active inline suggestions when the editor loses focus.
|
|
4773
4778
|
*/
|
|
@@ -5141,91 +5146,92 @@ export namespace editor {
|
|
|
5141
5146
|
mouseWheelZoom = 84,
|
|
5142
5147
|
multiCursorMergeOverlapping = 85,
|
|
5143
5148
|
multiCursorModifier = 86,
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5149
|
+
mouseMiddleClickAction = 87,
|
|
5150
|
+
multiCursorPaste = 88,
|
|
5151
|
+
multiCursorLimit = 89,
|
|
5152
|
+
occurrencesHighlight = 90,
|
|
5153
|
+
occurrencesHighlightDelay = 91,
|
|
5154
|
+
overtypeCursorStyle = 92,
|
|
5155
|
+
overtypeOnPaste = 93,
|
|
5156
|
+
overviewRulerBorder = 94,
|
|
5157
|
+
overviewRulerLanes = 95,
|
|
5158
|
+
padding = 96,
|
|
5159
|
+
pasteAs = 97,
|
|
5160
|
+
parameterHints = 98,
|
|
5161
|
+
peekWidgetDefaultFocus = 99,
|
|
5162
|
+
placeholder = 100,
|
|
5163
|
+
definitionLinkOpensInPeek = 101,
|
|
5164
|
+
quickSuggestions = 102,
|
|
5165
|
+
quickSuggestionsDelay = 103,
|
|
5166
|
+
readOnly = 104,
|
|
5167
|
+
readOnlyMessage = 105,
|
|
5168
|
+
renameOnType = 106,
|
|
5169
|
+
renderRichScreenReaderContent = 107,
|
|
5170
|
+
renderControlCharacters = 108,
|
|
5171
|
+
renderFinalNewline = 109,
|
|
5172
|
+
renderLineHighlight = 110,
|
|
5173
|
+
renderLineHighlightOnlyWhenFocus = 111,
|
|
5174
|
+
renderValidationDecorations = 112,
|
|
5175
|
+
renderWhitespace = 113,
|
|
5176
|
+
revealHorizontalRightPadding = 114,
|
|
5177
|
+
roundedSelection = 115,
|
|
5178
|
+
rulers = 116,
|
|
5179
|
+
scrollbar = 117,
|
|
5180
|
+
scrollBeyondLastColumn = 118,
|
|
5181
|
+
scrollBeyondLastLine = 119,
|
|
5182
|
+
scrollPredominantAxis = 120,
|
|
5183
|
+
selectionClipboard = 121,
|
|
5184
|
+
selectionHighlight = 122,
|
|
5185
|
+
selectionHighlightMaxLength = 123,
|
|
5186
|
+
selectionHighlightMultiline = 124,
|
|
5187
|
+
selectOnLineNumbers = 125,
|
|
5188
|
+
showFoldingControls = 126,
|
|
5189
|
+
showUnused = 127,
|
|
5190
|
+
snippetSuggestions = 128,
|
|
5191
|
+
smartSelect = 129,
|
|
5192
|
+
smoothScrolling = 130,
|
|
5193
|
+
stickyScroll = 131,
|
|
5194
|
+
stickyTabStops = 132,
|
|
5195
|
+
stopRenderingLineAfter = 133,
|
|
5196
|
+
suggest = 134,
|
|
5197
|
+
suggestFontSize = 135,
|
|
5198
|
+
suggestLineHeight = 136,
|
|
5199
|
+
suggestOnTriggerCharacters = 137,
|
|
5200
|
+
suggestSelection = 138,
|
|
5201
|
+
tabCompletion = 139,
|
|
5202
|
+
tabIndex = 140,
|
|
5203
|
+
trimWhitespaceOnDelete = 141,
|
|
5204
|
+
unicodeHighlighting = 142,
|
|
5205
|
+
unusualLineTerminators = 143,
|
|
5206
|
+
useShadowDOM = 144,
|
|
5207
|
+
useTabStops = 145,
|
|
5208
|
+
wordBreak = 146,
|
|
5209
|
+
wordSegmenterLocales = 147,
|
|
5210
|
+
wordSeparators = 148,
|
|
5211
|
+
wordWrap = 149,
|
|
5212
|
+
wordWrapBreakAfterCharacters = 150,
|
|
5213
|
+
wordWrapBreakBeforeCharacters = 151,
|
|
5214
|
+
wordWrapColumn = 152,
|
|
5215
|
+
wordWrapOverride1 = 153,
|
|
5216
|
+
wordWrapOverride2 = 154,
|
|
5217
|
+
wrappingIndent = 155,
|
|
5218
|
+
wrappingStrategy = 156,
|
|
5219
|
+
showDeprecated = 157,
|
|
5220
|
+
inertialScroll = 158,
|
|
5221
|
+
inlayHints = 159,
|
|
5222
|
+
wrapOnEscapedLineFeeds = 160,
|
|
5223
|
+
effectiveCursorStyle = 161,
|
|
5224
|
+
editorClassName = 162,
|
|
5225
|
+
pixelRatio = 163,
|
|
5226
|
+
tabFocusMode = 164,
|
|
5227
|
+
layoutInfo = 165,
|
|
5228
|
+
wrappingInfo = 166,
|
|
5229
|
+
defaultColorDecorators = 167,
|
|
5230
|
+
colorDecoratorsActivatedOn = 168,
|
|
5231
|
+
inlineCompletionsAccessibilityVerbose = 169,
|
|
5232
|
+
effectiveEditContext = 170,
|
|
5233
|
+
scrollOnMiddleClick = 171,
|
|
5234
|
+
effectiveAllowVariableFonts = 172
|
|
5229
5235
|
}
|
|
5230
5236
|
|
|
5231
5237
|
export const EditorOptions: {
|
|
@@ -5321,6 +5327,7 @@ export namespace editor {
|
|
|
5321
5327
|
mouseWheelZoom: IEditorOption<EditorOption.mouseWheelZoom, boolean>;
|
|
5322
5328
|
multiCursorMergeOverlapping: IEditorOption<EditorOption.multiCursorMergeOverlapping, boolean>;
|
|
5323
5329
|
multiCursorModifier: IEditorOption<EditorOption.multiCursorModifier, 'altKey' | 'metaKey' | 'ctrlKey'>;
|
|
5330
|
+
mouseMiddleClickAction: IEditorOption<EditorOption.mouseMiddleClickAction, MouseMiddleClickAction>;
|
|
5324
5331
|
multiCursorPaste: IEditorOption<EditorOption.multiCursorPaste, 'spread' | 'full'>;
|
|
5325
5332
|
multiCursorLimit: IEditorOption<EditorOption.multiCursorLimit, number>;
|
|
5326
5333
|
occurrencesHighlight: IEditorOption<EditorOption.occurrencesHighlight, 'off' | 'singleFile' | 'multiFile'>;
|
|
@@ -5347,7 +5354,7 @@ export namespace editor {
|
|
|
5347
5354
|
renderWhitespace: IEditorOption<EditorOption.renderWhitespace, 'all' | 'none' | 'boundary' | 'selection' | 'trailing'>;
|
|
5348
5355
|
revealHorizontalRightPadding: IEditorOption<EditorOption.revealHorizontalRightPadding, number>;
|
|
5349
5356
|
roundedSelection: IEditorOption<EditorOption.roundedSelection, boolean>;
|
|
5350
|
-
rulers: IEditorOption<EditorOption.rulers,
|
|
5357
|
+
rulers: IEditorOption<EditorOption.rulers, IRulerOption[]>;
|
|
5351
5358
|
scrollbar: IEditorOption<EditorOption.scrollbar, InternalEditorScrollbarOptions>;
|
|
5352
5359
|
scrollBeyondLastColumn: IEditorOption<EditorOption.scrollBeyondLastColumn, number>;
|
|
5353
5360
|
scrollBeyondLastLine: IEditorOption<EditorOption.scrollBeyondLastLine, boolean>;
|
|
@@ -5376,12 +5383,12 @@ export namespace editor {
|
|
|
5376
5383
|
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
|
5377
5384
|
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
|
|
5378
5385
|
trimWhitespaceOnDelete: IEditorOption<EditorOption.trimWhitespaceOnDelete, boolean>;
|
|
5379
|
-
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting,
|
|
5386
|
+
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
|
|
5380
5387
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'off' | 'auto' | 'prompt'>;
|
|
5381
5388
|
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
|
|
5382
5389
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
|
5383
5390
|
wordBreak: IEditorOption<EditorOption.wordBreak, 'normal' | 'keepAll'>;
|
|
5384
|
-
wordSegmenterLocales: IEditorOption<EditorOption.wordSegmenterLocales,
|
|
5391
|
+
wordSegmenterLocales: IEditorOption<EditorOption.wordSegmenterLocales, string[]>;
|
|
5385
5392
|
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
|
|
5386
5393
|
wordWrap: IEditorOption<EditorOption.wordWrap, 'wordWrapColumn' | 'on' | 'off' | 'bounded'>;
|
|
5387
5394
|
wordWrapBreakAfterCharacters: IEditorOption<EditorOption.wordWrapBreakAfterCharacters, string>;
|
|
@@ -5413,6 +5420,8 @@ export namespace editor {
|
|
|
5413
5420
|
|
|
5414
5421
|
export type FindComputedEditorOptionValueById<T extends EditorOption> = NonNullable<ComputedEditorOptionValue<EditorOptionsType[FindEditorOptionsKeyById<T>]>>;
|
|
5415
5422
|
|
|
5423
|
+
export type MouseMiddleClickAction = 'default' | 'openLink' | 'ctrlLeftClick';
|
|
5424
|
+
|
|
5416
5425
|
export interface IEditorConstructionOptions extends IEditorOptions {
|
|
5417
5426
|
/**
|
|
5418
5427
|
* The initial editor dimension (to avoid measuring the container).
|
|
@@ -5676,7 +5685,7 @@ export namespace editor {
|
|
|
5676
5685
|
/**
|
|
5677
5686
|
* Event fired when the widget layout changes.
|
|
5678
5687
|
*/
|
|
5679
|
-
onDidLayout?: IEvent<void>;
|
|
5688
|
+
readonly onDidLayout?: IEvent<void>;
|
|
5680
5689
|
/**
|
|
5681
5690
|
* Render this overlay widget in a location where it could overflow the editor's view dom node.
|
|
5682
5691
|
*/
|
|
@@ -6494,7 +6503,7 @@ export namespace editor {
|
|
|
6494
6503
|
export const EditorZoom: IEditorZoom;
|
|
6495
6504
|
|
|
6496
6505
|
export interface IEditorZoom {
|
|
6497
|
-
onDidChangeZoomLevel: IEvent<number>;
|
|
6506
|
+
readonly onDidChangeZoomLevel: IEvent<number>;
|
|
6498
6507
|
getZoomLevel(): number;
|
|
6499
6508
|
setZoomLevel(zoomLevel: number): void;
|
|
6500
6509
|
}
|
|
@@ -6506,6 +6515,15 @@ export namespace editor {
|
|
|
6506
6515
|
|
|
6507
6516
|
export namespace languages {
|
|
6508
6517
|
|
|
6518
|
+
export class EditDeltaInfo {
|
|
6519
|
+
readonly linesAdded: number;
|
|
6520
|
+
readonly linesRemoved: number;
|
|
6521
|
+
readonly charsAdded: number;
|
|
6522
|
+
readonly charsRemoved: number;
|
|
6523
|
+
static fromText(text: string): EditDeltaInfo;
|
|
6524
|
+
static tryCreate(linesAdded: number | undefined, linesRemoved: number | undefined, charsAdded: number | undefined, charsRemoved: number | undefined): EditDeltaInfo | undefined;
|
|
6525
|
+
constructor(linesAdded: number, linesRemoved: number, charsAdded: number, charsRemoved: number);
|
|
6526
|
+
}
|
|
6509
6527
|
export interface IRelativePattern {
|
|
6510
6528
|
/**
|
|
6511
6529
|
* A base file path to which this pattern will be matched against relatively.
|
|
@@ -7491,25 +7509,29 @@ export namespace languages {
|
|
|
7491
7509
|
*/
|
|
7492
7510
|
readonly insertText: string | {
|
|
7493
7511
|
snippet: string;
|
|
7494
|
-
};
|
|
7512
|
+
} | undefined;
|
|
7495
7513
|
/**
|
|
7496
|
-
*
|
|
7497
|
-
*
|
|
7498
|
-
|
|
7499
|
-
|
|
7514
|
+
* The range to replace.
|
|
7515
|
+
* Must begin and end on the same line.
|
|
7516
|
+
* Refers to the current document or `uri` if provided.
|
|
7517
|
+
*/
|
|
7518
|
+
readonly range?: IRange;
|
|
7500
7519
|
/**
|
|
7501
7520
|
* An optional array of additional text edits that are applied when
|
|
7502
7521
|
* selecting this completion. Edits must not overlap with the main edit
|
|
7503
7522
|
* nor with themselves.
|
|
7523
|
+
* Refers to the current document or `uri` if provided.
|
|
7504
7524
|
*/
|
|
7505
7525
|
readonly additionalTextEdits?: editor.ISingleEditOperation[];
|
|
7506
7526
|
/**
|
|
7507
|
-
* The
|
|
7508
|
-
|
|
7527
|
+
* The file for which the edit applies to.
|
|
7528
|
+
*/
|
|
7529
|
+
readonly uri?: UriComponents;
|
|
7530
|
+
/**
|
|
7531
|
+
* A command that is run upon acceptance of this item.
|
|
7509
7532
|
*/
|
|
7510
|
-
readonly range?: IRange;
|
|
7511
7533
|
readonly command?: Command;
|
|
7512
|
-
readonly
|
|
7534
|
+
readonly gutterMenuLinkAction?: Command;
|
|
7513
7535
|
/**
|
|
7514
7536
|
* Is called the first time an inline completion is shown.
|
|
7515
7537
|
* @deprecated. Use `onDidShow` of the provider instead.
|
|
@@ -7522,9 +7544,10 @@ export namespace languages {
|
|
|
7522
7544
|
readonly completeBracketPairs?: boolean;
|
|
7523
7545
|
readonly isInlineEdit?: boolean;
|
|
7524
7546
|
readonly showInlineEditMenu?: boolean;
|
|
7547
|
+
/** Only show the inline suggestion when the cursor is in the showRange. */
|
|
7525
7548
|
readonly showRange?: IRange;
|
|
7526
7549
|
readonly warning?: InlineCompletionWarning;
|
|
7527
|
-
readonly
|
|
7550
|
+
readonly hint?: InlineCompletionHint;
|
|
7528
7551
|
/**
|
|
7529
7552
|
* Used for telemetry.
|
|
7530
7553
|
*/
|
|
@@ -7536,20 +7559,19 @@ export namespace languages {
|
|
|
7536
7559
|
icon?: IconPath;
|
|
7537
7560
|
}
|
|
7538
7561
|
|
|
7539
|
-
export enum
|
|
7562
|
+
export enum InlineCompletionHintStyle {
|
|
7540
7563
|
Code = 1,
|
|
7541
7564
|
Label = 2
|
|
7542
7565
|
}
|
|
7543
7566
|
|
|
7544
|
-
export interface
|
|
7567
|
+
export interface InlineCompletionHint {
|
|
7568
|
+
/** Refers to the current document. */
|
|
7545
7569
|
range: IRange;
|
|
7546
|
-
|
|
7547
|
-
|
|
7570
|
+
style: InlineCompletionHintStyle;
|
|
7571
|
+
content: string;
|
|
7572
|
+
jumpToEdit: boolean;
|
|
7548
7573
|
}
|
|
7549
7574
|
|
|
7550
|
-
/**
|
|
7551
|
-
* TODO: add `| Uri | { light: Uri; dark: Uri }`.
|
|
7552
|
-
*/
|
|
7553
7575
|
export type IconPath = editor.ThemeIcon;
|
|
7554
7576
|
|
|
7555
7577
|
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
|
|
@@ -7578,7 +7600,7 @@ export namespace languages {
|
|
|
7578
7600
|
* Will be called when an item is shown.
|
|
7579
7601
|
* @param updatedInsertText Is useful to understand bracket completion.
|
|
7580
7602
|
*/
|
|
7581
|
-
handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string): void;
|
|
7603
|
+
handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string, editDeltaInfo: EditDeltaInfo): void;
|
|
7582
7604
|
/**
|
|
7583
7605
|
* Will be called when an item is partially accepted. TODO: also handle full acceptance here!
|
|
7584
7606
|
* @param acceptedCharacters Deprecated. Use `info.acceptedCharacters` instead.
|
|
@@ -7647,9 +7669,9 @@ export namespace languages {
|
|
|
7647
7669
|
timeUntilShown: number | undefined;
|
|
7648
7670
|
timeUntilProviderRequest: number;
|
|
7649
7671
|
timeUntilProviderResponse: number;
|
|
7672
|
+
notShownReason: string | undefined;
|
|
7650
7673
|
editorType: string;
|
|
7651
7674
|
viewKind: string | undefined;
|
|
7652
|
-
error: string | undefined;
|
|
7653
7675
|
preceeded: boolean;
|
|
7654
7676
|
languageId: string;
|
|
7655
7677
|
requestReason: string;
|
|
@@ -7663,6 +7685,8 @@ export namespace languages {
|
|
|
7663
7685
|
sameShapeReplacements?: boolean;
|
|
7664
7686
|
typingInterval: number;
|
|
7665
7687
|
typingIntervalCharacterCount: number;
|
|
7688
|
+
selectedSuggestionInfo: boolean;
|
|
7689
|
+
availableProviders: string;
|
|
7666
7690
|
};
|
|
7667
7691
|
|
|
7668
7692
|
export interface CodeAction {
|
|
@@ -8369,7 +8393,7 @@ export namespace languages {
|
|
|
8369
8393
|
id: string;
|
|
8370
8394
|
title: string;
|
|
8371
8395
|
tooltip?: string;
|
|
8372
|
-
arguments?:
|
|
8396
|
+
arguments?: unknown[];
|
|
8373
8397
|
}
|
|
8374
8398
|
|
|
8375
8399
|
export interface CommentThreadRevealOptions {
|
|
@@ -8468,13 +8492,14 @@ export namespace languages {
|
|
|
8468
8492
|
}
|
|
8469
8493
|
|
|
8470
8494
|
export interface DocumentSemanticTokensProvider {
|
|
8471
|
-
onDidChange?: IEvent<void>;
|
|
8495
|
+
readonly onDidChange?: IEvent<void>;
|
|
8472
8496
|
getLegend(): SemanticTokensLegend;
|
|
8473
8497
|
provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
|
|
8474
8498
|
releaseDocumentSemanticTokens(resultId: string | undefined): void;
|
|
8475
8499
|
}
|
|
8476
8500
|
|
|
8477
8501
|
export interface DocumentRangeSemanticTokensProvider {
|
|
8502
|
+
readonly onDidChange?: IEvent<void>;
|
|
8478
8503
|
getLegend(): SemanticTokensLegend;
|
|
8479
8504
|
provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
|
8480
8505
|
}
|
package/types/textmate.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type TextmateThemeName = "andromeeda" | "aurora-x" | "ayu-dark" | "catppuccin-frappe" | "catppuccin-latte" | "catppuccin-macchiato" | "catppuccin-mocha" | "dark-plus" | "dracula" | "dracula-soft" | "everforest-dark" | "everforest-light" | "github-dark" | "github-dark-default" | "github-dark-dimmed" | "github-dark-high-contrast" | "github-light" | "github-light-default" | "github-light-high-contrast" | "gruvbox-dark-hard" | "gruvbox-dark-medium" | "gruvbox-dark-soft" | "gruvbox-light-hard" | "gruvbox-light-medium" | "gruvbox-light-soft" | "houston" | "kanagawa-dragon" | "kanagawa-lotus" | "kanagawa-wave" | "laserwave" | "light-plus" | "material-theme" | "material-theme-darker" | "material-theme-lighter" | "material-theme-ocean" | "material-theme-palenight" | "min-dark" | "min-light" | "monokai" | "night-owl" | "nord" | "one-dark-pro" | "one-light" | "plastic" | "poimandres" | "red" | "rose-pine" | "rose-pine-dawn" | "rose-pine-moon" | "slack-dark" | "slack-ochin" | "snazzy-light" | "solarized-dark" | "solarized-light" | "synthwave-84" | "tokyo-night" | "vesper" | "vitesse-black" | "vitesse-dark" | "vitesse-light";
|
|
2
|
-
export type TextmateGrammarName = "abap" | "actionscript-3" | "ada" | "angular-html" | "angular-ts" | "apache" | "apex" | "apl" | "applescript" | "ara" | "asciidoc" | "asm" | "astro" | "awk" | "ballerina" | "bat" | "beancount" | "berry" | "bibtex" | "bicep" | "blade" | "bsl" | "c" | "cadence" | "cairo" | "clarity" | "clojure" | "cmake" | "cobol" | "codeowners" | "codeql" | "coffee" | "common-lisp" | "coq" | "cpp" | "crystal" | "csharp" | "css" | "csv" | "cue" | "cypher" | "d" | "dart" | "dax" | "desktop" | "diff" | "docker" | "dotenv" | "dream-maker" | "edge" | "elixir" | "elm" | "emacs-lisp" | "erb" | "erlang" | "fennel" | "fish" | "fluent" | "fortran-fixed-form" | "fortran-free-form" | "fsharp" | "gdresource" | "gdscript" | "gdshader" | "genie" | "gherkin" | "git-commit" | "git-rebase" | "gleam" | "glimmer-js" | "glimmer-ts" | "glsl" | "gnuplot" | "go" | "graphql" | "groovy" | "hack" | "haml" | "handlebars" | "haskell" | "haxe" | "hcl" | "hjson" | "hlsl" | "html" | "html-derivative" | "http" | "hxml" | "hy" | "imba" | "ini" | "java" | "javascript" | "jinja" | "jison" | "json" | "json5" | "jsonc" | "jsonl" | "jsonnet" | "jssm" | "jsx" | "julia" | "kotlin" | "kusto" | "latex" | "lean" | "less" | "liquid" | "llvm" | "log" | "logo" | "lua" | "luau" | "make" | "markdown" | "marko" | "matlab" | "mdc" | "mdx" | "mermaid" | "mipsasm" | "mojo" | "move" | "narrat" | "nextflow" | "nginx" | "nim" | "nix" | "nushell" | "objective-c" | "objective-cpp" | "ocaml" | "pascal" | "perl" | "php" | "plsql" | "po" | "polar" | "postcss" | "powerquery" | "powershell" | "prisma" | "prolog" | "proto" | "pug" | "puppet" | "purescript" | "python" | "qml" | "qmldir" | "qss" | "r" | "racket" | "raku" | "razor" | "reg" | "regexp" | "rel" | "riscv" | "rst" | "ruby" | "rust" | "sas" | "sass" | "scala" | "scheme" | "scss" | "sdbl" | "shaderlab" | "shellscript" | "shellsession" | "smalltalk" | "solidity" | "soy" | "sparql" | "splunk" | "sql" | "ssh-config" | "stata" | "stylus" | "svelte" | "swift" | "system-verilog" | "systemd" | "talonscript" | "tasl" | "tcl" | "templ" | "terraform" | "tex" | "toml" | "ts-tags" | "tsv" | "tsx" | "turtle" | "twig" | "typescript" | "typespec" | "typst" | "v" | "vala" | "vb" | "verilog" | "vhdl" | "viml" | "vue" | "vue-html" | "vue-vine" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wikitext" | "wit" | "wolfram" | "xml" | "xsl" | "yaml" | "zenscript" | "zig";
|
|
2
|
+
export type TextmateGrammarName = "abap" | "actionscript-3" | "ada" | "angular-html" | "angular-ts" | "apache" | "apex" | "apl" | "applescript" | "ara" | "asciidoc" | "asm" | "astro" | "awk" | "ballerina" | "bat" | "beancount" | "berry" | "bibtex" | "bicep" | "blade" | "bsl" | "c" | "cadence" | "cairo" | "clarity" | "clojure" | "cmake" | "cobol" | "codeowners" | "codeql" | "coffee" | "common-lisp" | "coq" | "cpp" | "crystal" | "csharp" | "css" | "csv" | "cue" | "cypher" | "d" | "dart" | "dax" | "desktop" | "diff" | "docker" | "dotenv" | "dream-maker" | "edge" | "elixir" | "elm" | "emacs-lisp" | "erb" | "erlang" | "fennel" | "fish" | "fluent" | "fortran-fixed-form" | "fortran-free-form" | "fsharp" | "gdresource" | "gdscript" | "gdshader" | "genie" | "gherkin" | "git-commit" | "git-rebase" | "gleam" | "glimmer-js" | "glimmer-ts" | "glsl" | "gnuplot" | "go" | "graphql" | "groovy" | "hack" | "haml" | "handlebars" | "haskell" | "haxe" | "hcl" | "hjson" | "hlsl" | "html" | "html-derivative" | "http" | "hurl" | "hxml" | "hy" | "imba" | "ini" | "java" | "javascript" | "jinja" | "jison" | "json" | "json5" | "jsonc" | "jsonl" | "jsonnet" | "jssm" | "jsx" | "julia" | "kdl" | "kotlin" | "kusto" | "latex" | "lean" | "less" | "liquid" | "llvm" | "log" | "logo" | "lua" | "luau" | "make" | "markdown" | "marko" | "matlab" | "mdc" | "mdx" | "mermaid" | "mipsasm" | "mojo" | "move" | "narrat" | "nextflow" | "nginx" | "nim" | "nix" | "nushell" | "objective-c" | "objective-cpp" | "ocaml" | "pascal" | "perl" | "php" | "pkl" | "plsql" | "po" | "polar" | "postcss" | "powerquery" | "powershell" | "prisma" | "prolog" | "proto" | "pug" | "puppet" | "purescript" | "python" | "qml" | "qmldir" | "qss" | "r" | "racket" | "raku" | "razor" | "reg" | "regexp" | "rel" | "riscv" | "rosmsg" | "rst" | "ruby" | "rust" | "sas" | "sass" | "scala" | "scheme" | "scss" | "sdbl" | "shaderlab" | "shellscript" | "shellsession" | "smalltalk" | "solidity" | "soy" | "sparql" | "splunk" | "sql" | "ssh-config" | "stata" | "stylus" | "svelte" | "swift" | "system-verilog" | "systemd" | "talonscript" | "tasl" | "tcl" | "templ" | "terraform" | "tex" | "toml" | "ts-tags" | "tsv" | "tsx" | "turtle" | "twig" | "typescript" | "typespec" | "typst" | "v" | "vala" | "vb" | "verilog" | "vhdl" | "viml" | "vue" | "vue-html" | "vue-vine" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wikitext" | "wit" | "wolfram" | "xml" | "xsl" | "yaml" | "zenscript" | "zig";
|
package/types/workspace.d.ts
CHANGED