@volar/monaco 1.6.5-patch.1 → 1.6.5-patch.2
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/out/editor.d.ts +1 -1
- package/out/editor.js +4 -3
- package/out/utils/markers.d.ts +1 -1
- package/out/utils/monaco2protocol.d.ts +3 -3
- package/out/utils/monaco2protocol.js +20 -16
- package/out/utils/protocol2monaco.d.ts +3 -3
- package/out/utils/protocol2monaco.js +143 -141
- package/out/utils/provider.js +3 -3
- package/package.json +5 -3
package/out/editor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageService } from '@volar/language-service';
|
|
2
|
-
import { editor as _editor, IDisposable, Uri } from 'monaco-editor-core';
|
|
2
|
+
import type { editor as _editor, IDisposable, Uri } from 'monaco-editor-core';
|
|
3
3
|
export declare namespace editor {
|
|
4
4
|
function activateMarkers(worker: _editor.MonacoWebWorker<LanguageService>, languages: string[], markersOwn: string, getSyncUris: () => Uri[], editor: typeof import('monaco-editor-core').editor): IDisposable;
|
|
5
5
|
function activateAutoInsertion(worker: _editor.MonacoWebWorker<LanguageService>, languages: string[], getSyncUris: () => Uri[], editor: typeof import('monaco-editor-core').editor): IDisposable;
|
package/out/editor.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.editor = void 0;
|
|
4
|
-
const monaco_editor_core_1 = require("monaco-editor-core");
|
|
5
4
|
const markers_1 = require("./utils/markers");
|
|
6
5
|
const protocol2monaco = require("./utils/protocol2monaco");
|
|
7
6
|
const monaco2protocol = require("./utils/monaco2protocol");
|
|
@@ -134,9 +133,11 @@ var editor;
|
|
|
134
133
|
if (model.getVersionId() !== version) {
|
|
135
134
|
return;
|
|
136
135
|
}
|
|
137
|
-
const position = new monaco_editor_core_1.Position(lastChange.range.startLineNumber, lastChange.range.startColumn + lastChange.text.length);
|
|
138
136
|
const languageService = await worker.withSyncedResources(getSyncUris());
|
|
139
|
-
const edit = await languageService.doAutoInsert(model.uri.toString(), monaco2protocol.asPosition(
|
|
137
|
+
const edit = await languageService.doAutoInsert(model.uri.toString(), monaco2protocol.asPosition({
|
|
138
|
+
lineNumber: lastChange.range.startLineNumber,
|
|
139
|
+
column: lastChange.range.startColumn + lastChange.text.length,
|
|
140
|
+
}), {
|
|
140
141
|
lastChange: {
|
|
141
142
|
range: monaco2protocol.asRange(lastChange.range),
|
|
142
143
|
rangeLength: lastChange.rangeLength,
|
package/out/utils/markers.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IMarkdownString, IRange,
|
|
2
|
-
import * as protocol from 'vscode-languageserver-protocol';
|
|
3
|
-
export declare function asPosition(position:
|
|
1
|
+
import type { IMarkdownString, IRange, IPosition, languages } from 'monaco-editor-core';
|
|
2
|
+
import type * as protocol from 'vscode-languageserver-protocol';
|
|
3
|
+
export declare function asPosition(position: IPosition): protocol.Position;
|
|
4
4
|
export declare function asRange(range: IRange): protocol.Range;
|
|
5
5
|
export declare function asCompletionContext(context: languages.CompletionContext): protocol.CompletionContext;
|
|
6
6
|
export declare function asSignatureHelpContext(context: languages.SignatureHelpContext): protocol.SignatureHelpContext;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.asFormattingOptions = exports.asTriggerKind = exports.asMarkdownString = exports.asParameterInformation = exports.asSignatureInformation = exports.asSignatureHelp = exports.asSignatureHelpTriggerKind = exports.asSignatureHelpContext = exports.asCompletionContext = exports.asRange = exports.asPosition = void 0;
|
|
4
|
-
const monaco_editor_core_1 = require("monaco-editor-core");
|
|
5
|
-
const protocol = require("vscode-languageserver-protocol");
|
|
6
4
|
function asPosition(position) {
|
|
7
|
-
return
|
|
5
|
+
return {
|
|
6
|
+
line: position.lineNumber - 1,
|
|
7
|
+
character: position.column - 1,
|
|
8
|
+
};
|
|
8
9
|
}
|
|
9
10
|
exports.asPosition = asPosition;
|
|
10
11
|
function asRange(range) {
|
|
11
|
-
return
|
|
12
|
+
return {
|
|
13
|
+
start: asPosition({ lineNumber: range.startLineNumber, column: range.startColumn }),
|
|
14
|
+
end: asPosition({ lineNumber: range.endLineNumber, column: range.endColumn }),
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
17
|
exports.asRange = asRange;
|
|
14
18
|
function asCompletionContext(context) {
|
|
@@ -29,12 +33,12 @@ function asSignatureHelpContext(context) {
|
|
|
29
33
|
exports.asSignatureHelpContext = asSignatureHelpContext;
|
|
30
34
|
function asSignatureHelpTriggerKind(kind) {
|
|
31
35
|
switch (kind) {
|
|
32
|
-
case
|
|
33
|
-
return
|
|
34
|
-
case
|
|
35
|
-
return
|
|
36
|
-
case
|
|
37
|
-
return
|
|
36
|
+
case 1:
|
|
37
|
+
return 1;
|
|
38
|
+
case 2:
|
|
39
|
+
return 2;
|
|
40
|
+
case 3:
|
|
41
|
+
return 3;
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
exports.asSignatureHelpTriggerKind = asSignatureHelpTriggerKind;
|
|
@@ -77,12 +81,12 @@ function asMarkdownString(entry) {
|
|
|
77
81
|
exports.asMarkdownString = asMarkdownString;
|
|
78
82
|
function asTriggerKind(kind) {
|
|
79
83
|
switch (kind) {
|
|
80
|
-
case
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
return
|
|
84
|
+
case 0:
|
|
85
|
+
return 1;
|
|
86
|
+
case 1:
|
|
87
|
+
return 2;
|
|
88
|
+
case 2:
|
|
89
|
+
return 3;
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
exports.asTriggerKind = asTriggerKind;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { editor, IMarkdownString, IRange, languages, MarkerSeverity, MarkerTag,
|
|
2
|
-
import * as protocol from 'vscode-languageserver-protocol';
|
|
1
|
+
import type { editor, IMarkdownString, IRange, languages, MarkerSeverity, MarkerTag, IPosition, Uri } from 'monaco-editor-core';
|
|
2
|
+
import type * as protocol from 'vscode-languageserver-protocol';
|
|
3
3
|
export declare function asCompletionList(list: protocol.CompletionList, range: protocol.Range): languages.CompletionList;
|
|
4
4
|
export declare function asCompletionItemKind(kind: protocol.CompletionItemKind | undefined): languages.CompletionItemKind;
|
|
5
5
|
export declare function asCompletionItem(item: protocol.CompletionItem, range: protocol.Range): languages.CompletionItem;
|
|
@@ -35,4 +35,4 @@ export declare function asInlayHint(item: protocol.InlayHint): languages.InlayHi
|
|
|
35
35
|
export declare function asInlayHintKind(kind: protocol.InlayHintKind): languages.InlayHintKind;
|
|
36
36
|
export declare function asInlayHintLabel(label: protocol.InlayHint['label']): languages.InlayHint['label'];
|
|
37
37
|
export declare function asInlayHintLabelPart(part: protocol.InlayHintLabelPart): languages.InlayHintLabelPart;
|
|
38
|
-
export declare function asPosition(position: protocol.Position):
|
|
38
|
+
export declare function asPosition(position: protocol.Position): IPosition;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.asPosition = exports.asInlayHintLabelPart = exports.asInlayHintLabel = exports.asInlayHintKind = exports.asInlayHint = exports.asSelectionRange = exports.asFoldingRange = exports.asColorPresentation = exports.asColorInformation = exports.asLink = exports.asCodeAction = exports.asCodeLens = exports.asDocumentHighlightKind = exports.asDocumentHighlight = exports.asSymbolKind = exports.asSymbolTag = exports.asDocumentSymbol = exports.asWorkspaceEdit = exports.asMarkerSeverity = exports.asRelatedInformation = exports.asMarkerTag = exports.asMarkerData = exports.asParameterInformation = exports.asSignatureInformation = exports.asSignatureHelp = exports.asUri = exports.asLocation = exports.asMarkdownString = exports.asHover = exports.asRange = exports.asCompletionItemRange = exports.asTextEdit = exports.asCommand = exports.asCompletionItem = exports.asCompletionItemKind = exports.asCompletionList = void 0;
|
|
4
|
-
const
|
|
5
|
-
const protocol = require("vscode-languageserver-protocol");
|
|
4
|
+
const vscode_uri_1 = require("vscode-uri");
|
|
6
5
|
function asCompletionList(list, range) {
|
|
7
6
|
return {
|
|
8
7
|
incomplete: list.isIncomplete,
|
|
@@ -12,58 +11,58 @@ function asCompletionList(list, range) {
|
|
|
12
11
|
exports.asCompletionList = asCompletionList;
|
|
13
12
|
function asCompletionItemKind(kind) {
|
|
14
13
|
switch (kind) {
|
|
15
|
-
case
|
|
16
|
-
return
|
|
17
|
-
case
|
|
18
|
-
return
|
|
19
|
-
case
|
|
20
|
-
return
|
|
21
|
-
case
|
|
22
|
-
return
|
|
23
|
-
case
|
|
24
|
-
return
|
|
25
|
-
case
|
|
26
|
-
return
|
|
27
|
-
case
|
|
28
|
-
return
|
|
29
|
-
case
|
|
30
|
-
return
|
|
31
|
-
case
|
|
32
|
-
return
|
|
33
|
-
case
|
|
34
|
-
return
|
|
35
|
-
case
|
|
36
|
-
return
|
|
37
|
-
case
|
|
38
|
-
return
|
|
39
|
-
case
|
|
40
|
-
return
|
|
41
|
-
case
|
|
42
|
-
return
|
|
43
|
-
case
|
|
44
|
-
return
|
|
45
|
-
case
|
|
46
|
-
return
|
|
47
|
-
case
|
|
48
|
-
return
|
|
49
|
-
case
|
|
50
|
-
return
|
|
51
|
-
case
|
|
52
|
-
return
|
|
53
|
-
case
|
|
54
|
-
return
|
|
55
|
-
case
|
|
56
|
-
return
|
|
57
|
-
case
|
|
58
|
-
return
|
|
59
|
-
case
|
|
60
|
-
return
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
14
|
+
case 2:
|
|
15
|
+
return 0;
|
|
16
|
+
case 3:
|
|
17
|
+
return 1;
|
|
18
|
+
case 4:
|
|
19
|
+
return 2;
|
|
20
|
+
case 5:
|
|
21
|
+
return 3;
|
|
22
|
+
case 6:
|
|
23
|
+
return 4;
|
|
24
|
+
case 7:
|
|
25
|
+
return 5;
|
|
26
|
+
case 8:
|
|
27
|
+
return 7;
|
|
28
|
+
case 9:
|
|
29
|
+
return 8;
|
|
30
|
+
case 10:
|
|
31
|
+
return 9;
|
|
32
|
+
case 11:
|
|
33
|
+
return 12;
|
|
34
|
+
case 12:
|
|
35
|
+
return 13;
|
|
36
|
+
case 13:
|
|
37
|
+
return 15;
|
|
38
|
+
case 14:
|
|
39
|
+
return 17;
|
|
40
|
+
case 15:
|
|
41
|
+
return 27;
|
|
42
|
+
case 1:
|
|
43
|
+
return 18;
|
|
44
|
+
case 16:
|
|
45
|
+
return 19;
|
|
46
|
+
case 17:
|
|
47
|
+
return 20;
|
|
48
|
+
case 18:
|
|
49
|
+
return 21;
|
|
50
|
+
case 19:
|
|
51
|
+
return 23;
|
|
52
|
+
case 20:
|
|
53
|
+
return 16;
|
|
54
|
+
case 21:
|
|
55
|
+
return 14;
|
|
56
|
+
case 22:
|
|
57
|
+
return 6;
|
|
58
|
+
case 23:
|
|
59
|
+
return 10;
|
|
60
|
+
case 24:
|
|
61
|
+
return 11;
|
|
62
|
+
case 25:
|
|
63
|
+
return 24;
|
|
65
64
|
default:
|
|
66
|
-
return
|
|
65
|
+
return 18;
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
exports.asCompletionItemKind = asCompletionItemKind;
|
|
@@ -78,7 +77,7 @@ function asCompletionItem(item, range) {
|
|
|
78
77
|
filterText: item.filterText,
|
|
79
78
|
preselect: item.preselect,
|
|
80
79
|
insertText: item.textEdit?.newText ?? item.insertText ?? item.label,
|
|
81
|
-
insertTextRules:
|
|
80
|
+
insertTextRules: 4,
|
|
82
81
|
range: item.textEdit ? asCompletionItemRange(item.textEdit) : asRange(range),
|
|
83
82
|
commitCharacters: item.commitCharacters,
|
|
84
83
|
additionalTextEdits: item.additionalTextEdits?.map(asTextEdit),
|
|
@@ -102,7 +101,7 @@ function asTextEdit(edit) {
|
|
|
102
101
|
}
|
|
103
102
|
exports.asTextEdit = asTextEdit;
|
|
104
103
|
function asCompletionItemRange(textEdit) {
|
|
105
|
-
if (
|
|
104
|
+
if ('insert' in textEdit && 'replace' in textEdit) {
|
|
106
105
|
const result = {
|
|
107
106
|
insert: asRange(textEdit.insert),
|
|
108
107
|
replace: asRange(textEdit.replace),
|
|
@@ -141,7 +140,7 @@ function asMarkdownString(markdownString) {
|
|
|
141
140
|
}
|
|
142
141
|
exports.asMarkdownString = asMarkdownString;
|
|
143
142
|
function asLocation(definition) {
|
|
144
|
-
if (
|
|
143
|
+
if ('targetUri' in definition && 'targetSelectionRange' in definition) {
|
|
145
144
|
return {
|
|
146
145
|
uri: asUri(definition.targetUri),
|
|
147
146
|
range: asRange(definition.targetSelectionRange),
|
|
@@ -156,7 +155,7 @@ function asLocation(definition) {
|
|
|
156
155
|
}
|
|
157
156
|
exports.asLocation = asLocation;
|
|
158
157
|
function asUri(uri) {
|
|
159
|
-
return
|
|
158
|
+
return vscode_uri_1.URI.parse(uri);
|
|
160
159
|
}
|
|
161
160
|
exports.asUri = asUri;
|
|
162
161
|
function asSignatureHelp(signatureHelp) {
|
|
@@ -199,10 +198,10 @@ function asMarkerData(diagnostic) {
|
|
|
199
198
|
exports.asMarkerData = asMarkerData;
|
|
200
199
|
function asMarkerTag(tag) {
|
|
201
200
|
switch (tag) {
|
|
202
|
-
case
|
|
203
|
-
return
|
|
204
|
-
case
|
|
205
|
-
return
|
|
201
|
+
case 1:
|
|
202
|
+
return 1;
|
|
203
|
+
case 2:
|
|
204
|
+
return 2;
|
|
206
205
|
}
|
|
207
206
|
}
|
|
208
207
|
exports.asMarkerTag = asMarkerTag;
|
|
@@ -216,16 +215,16 @@ function asRelatedInformation(relatedInformation) {
|
|
|
216
215
|
exports.asRelatedInformation = asRelatedInformation;
|
|
217
216
|
function asMarkerSeverity(severity) {
|
|
218
217
|
switch (severity) {
|
|
219
|
-
case
|
|
220
|
-
return
|
|
221
|
-
case
|
|
222
|
-
return
|
|
223
|
-
case
|
|
224
|
-
return
|
|
225
|
-
case
|
|
226
|
-
return
|
|
218
|
+
case 1:
|
|
219
|
+
return 8;
|
|
220
|
+
case 2:
|
|
221
|
+
return 4;
|
|
222
|
+
case 3:
|
|
223
|
+
return 2;
|
|
224
|
+
case 4:
|
|
225
|
+
return 1;
|
|
227
226
|
default:
|
|
228
|
-
return
|
|
227
|
+
return 2;
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
230
|
exports.asMarkerSeverity = asMarkerSeverity;
|
|
@@ -247,7 +246,7 @@ function asWorkspaceEdit(workspaceEdit) {
|
|
|
247
246
|
}
|
|
248
247
|
if (workspaceEdit.documentChanges) {
|
|
249
248
|
for (const documentChange of workspaceEdit.documentChanges) {
|
|
250
|
-
if (
|
|
249
|
+
if ('edits' in documentChange) {
|
|
251
250
|
for (const edit of documentChange.edits) {
|
|
252
251
|
result.edits.push({
|
|
253
252
|
resource: asUri(documentChange.textDocument.uri),
|
|
@@ -256,7 +255,7 @@ function asWorkspaceEdit(workspaceEdit) {
|
|
|
256
255
|
});
|
|
257
256
|
}
|
|
258
257
|
}
|
|
259
|
-
else if (
|
|
258
|
+
else if (documentChange.kind === 'create') {
|
|
260
259
|
result.edits.push({
|
|
261
260
|
newResource: asUri(documentChange.uri),
|
|
262
261
|
options: {
|
|
@@ -265,7 +264,7 @@ function asWorkspaceEdit(workspaceEdit) {
|
|
|
265
264
|
},
|
|
266
265
|
});
|
|
267
266
|
}
|
|
268
|
-
else if (
|
|
267
|
+
else if (documentChange.kind === 'rename') {
|
|
269
268
|
result.edits.push({
|
|
270
269
|
oldResource: asUri(documentChange.oldUri),
|
|
271
270
|
newResource: asUri(documentChange.newUri),
|
|
@@ -275,7 +274,7 @@ function asWorkspaceEdit(workspaceEdit) {
|
|
|
275
274
|
},
|
|
276
275
|
});
|
|
277
276
|
}
|
|
278
|
-
else if (
|
|
277
|
+
else if (documentChange.kind === 'delete') {
|
|
279
278
|
result.edits.push({
|
|
280
279
|
oldResource: asUri(documentChange.uri),
|
|
281
280
|
options: {
|
|
@@ -305,67 +304,67 @@ function asDocumentSymbol(symbol) {
|
|
|
305
304
|
exports.asDocumentSymbol = asDocumentSymbol;
|
|
306
305
|
function asSymbolTag(tag) {
|
|
307
306
|
switch (tag) {
|
|
308
|
-
case
|
|
309
|
-
return
|
|
307
|
+
case 1:
|
|
308
|
+
return 1;
|
|
310
309
|
}
|
|
311
310
|
}
|
|
312
311
|
exports.asSymbolTag = asSymbolTag;
|
|
313
312
|
function asSymbolKind(kind) {
|
|
314
313
|
switch (kind) {
|
|
315
|
-
case
|
|
316
|
-
return
|
|
317
|
-
case
|
|
318
|
-
return
|
|
319
|
-
case
|
|
320
|
-
return
|
|
321
|
-
case
|
|
322
|
-
return
|
|
323
|
-
case
|
|
324
|
-
return
|
|
325
|
-
case
|
|
326
|
-
return
|
|
327
|
-
case
|
|
328
|
-
return
|
|
329
|
-
case
|
|
330
|
-
return
|
|
331
|
-
case
|
|
332
|
-
return
|
|
333
|
-
case
|
|
334
|
-
return
|
|
335
|
-
case
|
|
336
|
-
return
|
|
337
|
-
case
|
|
338
|
-
return
|
|
339
|
-
case
|
|
340
|
-
return
|
|
341
|
-
case
|
|
342
|
-
return
|
|
343
|
-
case
|
|
344
|
-
return
|
|
345
|
-
case
|
|
346
|
-
return
|
|
347
|
-
case
|
|
348
|
-
return
|
|
349
|
-
case
|
|
350
|
-
return
|
|
351
|
-
case
|
|
352
|
-
return
|
|
353
|
-
case
|
|
354
|
-
return
|
|
355
|
-
case
|
|
356
|
-
return
|
|
357
|
-
case
|
|
358
|
-
return
|
|
359
|
-
case
|
|
360
|
-
return
|
|
361
|
-
case
|
|
362
|
-
return
|
|
363
|
-
case
|
|
364
|
-
return
|
|
365
|
-
case
|
|
366
|
-
return
|
|
314
|
+
case 1:
|
|
315
|
+
return 0;
|
|
316
|
+
case 2:
|
|
317
|
+
return 1;
|
|
318
|
+
case 3:
|
|
319
|
+
return 2;
|
|
320
|
+
case 4:
|
|
321
|
+
return 3;
|
|
322
|
+
case 5:
|
|
323
|
+
return 4;
|
|
324
|
+
case 6:
|
|
325
|
+
return 5;
|
|
326
|
+
case 7:
|
|
327
|
+
return 6;
|
|
328
|
+
case 8:
|
|
329
|
+
return 7;
|
|
330
|
+
case 9:
|
|
331
|
+
return 8;
|
|
332
|
+
case 10:
|
|
333
|
+
return 9;
|
|
334
|
+
case 11:
|
|
335
|
+
return 10;
|
|
336
|
+
case 12:
|
|
337
|
+
return 11;
|
|
338
|
+
case 13:
|
|
339
|
+
return 12;
|
|
340
|
+
case 14:
|
|
341
|
+
return 13;
|
|
342
|
+
case 15:
|
|
343
|
+
return 14;
|
|
344
|
+
case 16:
|
|
345
|
+
return 15;
|
|
346
|
+
case 17:
|
|
347
|
+
return 16;
|
|
348
|
+
case 18:
|
|
349
|
+
return 17;
|
|
350
|
+
case 19:
|
|
351
|
+
return 18;
|
|
352
|
+
case 20:
|
|
353
|
+
return 19;
|
|
354
|
+
case 21:
|
|
355
|
+
return 20;
|
|
356
|
+
case 22:
|
|
357
|
+
return 21;
|
|
358
|
+
case 23:
|
|
359
|
+
return 22;
|
|
360
|
+
case 24:
|
|
361
|
+
return 23;
|
|
362
|
+
case 25:
|
|
363
|
+
return 24;
|
|
364
|
+
case 26:
|
|
365
|
+
return 25;
|
|
367
366
|
default:
|
|
368
|
-
return
|
|
367
|
+
return 0;
|
|
369
368
|
}
|
|
370
369
|
}
|
|
371
370
|
exports.asSymbolKind = asSymbolKind;
|
|
@@ -378,14 +377,14 @@ function asDocumentHighlight(highlight) {
|
|
|
378
377
|
exports.asDocumentHighlight = asDocumentHighlight;
|
|
379
378
|
function asDocumentHighlightKind(kind) {
|
|
380
379
|
switch (kind) {
|
|
381
|
-
case
|
|
382
|
-
return
|
|
383
|
-
case
|
|
384
|
-
return
|
|
385
|
-
case
|
|
386
|
-
return
|
|
380
|
+
case 1:
|
|
381
|
+
return 0;
|
|
382
|
+
case 2:
|
|
383
|
+
return 1;
|
|
384
|
+
case 3:
|
|
385
|
+
return 2;
|
|
387
386
|
default:
|
|
388
|
-
return
|
|
387
|
+
return 0;
|
|
389
388
|
}
|
|
390
389
|
}
|
|
391
390
|
exports.asDocumentHighlightKind = asDocumentHighlightKind;
|
|
@@ -464,10 +463,10 @@ function asInlayHint(item) {
|
|
|
464
463
|
exports.asInlayHint = asInlayHint;
|
|
465
464
|
function asInlayHintKind(kind) {
|
|
466
465
|
switch (kind) {
|
|
467
|
-
case
|
|
468
|
-
return
|
|
469
|
-
case
|
|
470
|
-
return
|
|
466
|
+
case 2:
|
|
467
|
+
return 2;
|
|
468
|
+
case 1:
|
|
469
|
+
return 1;
|
|
471
470
|
}
|
|
472
471
|
}
|
|
473
472
|
exports.asInlayHintKind = asInlayHintKind;
|
|
@@ -490,7 +489,10 @@ function asInlayHintLabelPart(part) {
|
|
|
490
489
|
}
|
|
491
490
|
exports.asInlayHintLabelPart = asInlayHintLabelPart;
|
|
492
491
|
function asPosition(position) {
|
|
493
|
-
return
|
|
492
|
+
return {
|
|
493
|
+
lineNumber: position.line + 1,
|
|
494
|
+
column: position.character + 1,
|
|
495
|
+
};
|
|
494
496
|
}
|
|
495
497
|
exports.asPosition = asPosition;
|
|
496
498
|
//# sourceMappingURL=protocol2monaco.js.map
|
package/out/utils/provider.js
CHANGED
|
@@ -15,9 +15,9 @@ async function createLanguageFeaturesProvider(worker, getSyncUris) {
|
|
|
15
15
|
const languageService = await worker.getProxy();
|
|
16
16
|
return {
|
|
17
17
|
triggerCharacters: await languageService.triggerCharacters(),
|
|
18
|
-
autoFormatTriggerCharacters: await languageService.
|
|
19
|
-
signatureHelpTriggerCharacters: await languageService.
|
|
20
|
-
signatureHelpRetriggerCharacters: await languageService.
|
|
18
|
+
autoFormatTriggerCharacters: await languageService.autoFormatTriggerCharacters(),
|
|
19
|
+
signatureHelpTriggerCharacters: await languageService.signatureHelpTriggerCharacters(),
|
|
20
|
+
signatureHelpRetriggerCharacters: await languageService.signatureHelpRetriggerCharacters(),
|
|
21
21
|
getLegend() {
|
|
22
22
|
return language_service_1.standardSemanticTokensLegend;
|
|
23
23
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/monaco",
|
|
3
|
-
"version": "1.6.5-patch.
|
|
3
|
+
"version": "1.6.5-patch.2",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@volar/language-service": "1.6.5",
|
|
19
|
-
"monaco-editor-core": "^0.36.0",
|
|
20
|
-
"vscode-languageserver-protocol": "^3.17.3",
|
|
21
19
|
"vscode-uri": "^3.0.7"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"monaco-editor-core": "latest",
|
|
23
|
+
"vscode-languageserver-protocol": "^3.17.3"
|
|
22
24
|
}
|
|
23
25
|
}
|