monaco-editor11 1.0.7 → 1.0.9
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/dist/assets/css.worker-C7FogG4G.js +93 -0
- package/dist/assets/editor.worker-iXcRX1Tq.js +26 -0
- package/dist/assets/html.worker-C8VxctEJ.js +470 -0
- package/dist/assets/json.worker-CMC9kgPL.js +58 -0
- package/dist/assets/ts.worker-CtTJ3hNN.js +67731 -0
- package/dist/index.d.ts +0 -6
- package/dist/monaco-editor11.es.js +49 -78
- package/dist/monaco-editor11.umd.js +1 -50
- package/dist/monaco.d.ts +8 -0
- package/dist/workers/common/initialize.js +16 -0
- package/dist/workers/common/workers.js +141 -0
- package/dist/workers/editor/common/abstractSyntaxTokenBackend.js +128 -0
- package/dist/workers/editor/common/abstractText.js +89 -0
- package/dist/workers/editor/common/ast.js +485 -0
- package/dist/workers/editor/common/autoIndent.js +390 -0
- package/dist/workers/editor/common/beforeEditPositionMapper.js +110 -0
- package/dist/workers/editor/common/bracketPairsImpl.js +717 -0
- package/dist/workers/editor/common/bracketPairsTree.js +343 -0
- package/dist/workers/editor/common/brackets.js +108 -0
- package/dist/workers/editor/common/characterClassifier.js +59 -0
- package/dist/workers/editor/common/characterPair.js +40 -0
- package/dist/workers/editor/common/colorizedBracketPairsDecorationProvider.js +97 -0
- package/dist/workers/editor/common/columnRange.js +35 -0
- package/dist/workers/editor/common/combineTextEditInfos.js +124 -0
- package/dist/workers/editor/common/common.js +20 -0
- package/dist/workers/editor/common/computeMovedLines.js +249 -0
- package/dist/workers/editor/common/concat23Trees.js +192 -0
- package/dist/workers/editor/common/contiguousMultilineTokens.js +32 -0
- package/dist/workers/editor/common/contiguousMultilineTokensBuilder.js +23 -0
- package/dist/workers/editor/common/contiguousTokensEditing.js +128 -0
- package/dist/workers/editor/common/contiguousTokensStore.js +207 -0
- package/dist/workers/editor/common/coordinatesConverter.js +51 -0
- package/dist/workers/editor/common/cursor.js +899 -0
- package/dist/workers/editor/common/cursorAtomicMoveOperations.js +145 -0
- package/dist/workers/editor/common/cursorCollection.js +194 -0
- package/dist/workers/editor/common/cursorColumnSelection.js +93 -0
- package/dist/workers/editor/common/cursorColumns.js +112 -0
- package/dist/workers/editor/common/cursorCommon.js +250 -0
- package/dist/workers/editor/common/cursorContext.js +15 -0
- package/dist/workers/editor/common/cursorDeleteOperations.js +231 -0
- package/dist/workers/editor/common/cursorMoveCommands.js +676 -0
- package/dist/workers/editor/common/cursorMoveOperations.js +290 -0
- package/dist/workers/editor/common/cursorTypeEditOperations.js +968 -0
- package/dist/workers/editor/common/cursorTypeOperations.js +173 -0
- package/dist/workers/editor/common/cursorUtils.js +75 -0
- package/dist/workers/editor/common/cursorWordOperations.js +720 -0
- package/dist/workers/editor/common/defaultDocumentColorsComputer.js +138 -0
- package/dist/workers/editor/common/defaultLinesDiffComputer.js +188 -0
- package/dist/workers/editor/common/diffAlgorithm.js +139 -0
- package/dist/workers/editor/common/diffEditor.js +38 -0
- package/dist/workers/editor/common/dynamicProgrammingDiffing.js +101 -0
- package/dist/workers/editor/common/edit.js +183 -0
- package/dist/workers/editor/common/editOperation.js +36 -0
- package/dist/workers/editor/common/editStack.js +363 -0
- package/dist/workers/editor/common/editorAction.js +26 -0
- package/dist/workers/editor/common/editorBaseApi.js +43 -0
- package/dist/workers/editor/common/editorColorRegistry.js +102 -0
- package/dist/workers/editor/common/editorCommon.js +13 -0
- package/dist/workers/editor/common/editorConfigurationSchema.js +338 -0
- package/dist/workers/editor/common/editorContextKeys.js +84 -0
- package/dist/workers/editor/common/editorFeatures.js +17 -0
- package/dist/workers/editor/common/editorOptions.js +3440 -0
- package/dist/workers/editor/common/editorTheme.js +23 -0
- package/dist/workers/editor/common/editorWebWorker.js +299 -0
- package/dist/workers/editor/common/editorWorker.js +9 -0
- package/dist/workers/editor/common/editorWorkerHost.js +15 -0
- package/dist/workers/editor/common/editorZoom.js +26 -0
- package/dist/workers/editor/common/electricCharacter.js +55 -0
- package/dist/workers/editor/common/encodedTokenAttributes.js +79 -0
- package/dist/workers/editor/common/enterAction.js +53 -0
- package/dist/workers/editor/common/eolCounter.js +44 -0
- package/dist/workers/editor/common/findSectionHeaders.js +128 -0
- package/dist/workers/editor/common/fixBrackets.js +67 -0
- package/dist/workers/editor/common/fixedArray.js +70 -0
- package/dist/workers/editor/common/fontInfo.js +172 -0
- package/dist/workers/editor/common/fontInfoFromSettings.js +29 -0
- package/dist/workers/editor/common/getIconClasses.js +106 -0
- package/dist/workers/editor/common/getPositionOffsetTransformerFromTextModel.js +24 -0
- package/dist/workers/editor/common/glyphLanesModel.js +61 -0
- package/dist/workers/editor/common/guidesTextModelPart.js +405 -0
- package/dist/workers/editor/common/heuristicSequenceOptimizations.js +374 -0
- package/dist/workers/editor/common/indentRules.js +63 -0
- package/dist/workers/editor/common/indentation.js +39 -0
- package/dist/workers/editor/common/indentationGuesser.js +178 -0
- package/dist/workers/editor/common/indentationLineProcessor.js +193 -0
- package/dist/workers/editor/common/inlineDecorations.js +26 -0
- package/dist/workers/editor/common/inplaceReplaceSupport.js +87 -0
- package/dist/workers/editor/common/inputMode.js +22 -0
- package/dist/workers/editor/common/intervalTree.js +1002 -0
- package/dist/workers/editor/common/language.js +9 -0
- package/dist/workers/editor/common/languageBracketsConfiguration.js +133 -0
- package/dist/workers/editor/common/languageConfiguration.js +138 -0
- package/dist/workers/editor/common/languageConfigurationRegistry.js +361 -0
- package/dist/workers/editor/common/languageFeatureDebounce.js +137 -0
- package/dist/workers/editor/common/languageFeatureRegistry.js +180 -0
- package/dist/workers/editor/common/languageFeatures.js +9 -0
- package/dist/workers/editor/common/languageFeaturesService.js +47 -0
- package/dist/workers/editor/common/languageSelector.js +112 -0
- package/dist/workers/editor/common/languageService.js +92 -0
- package/dist/workers/editor/common/languages.js +522 -0
- package/dist/workers/editor/common/languagesAssociations.js +193 -0
- package/dist/workers/editor/common/languagesRegistry.js +237 -0
- package/dist/workers/editor/common/legacyLinesDiffComputer.js +468 -0
- package/dist/workers/editor/common/length.js +129 -0
- package/dist/workers/editor/common/lineDecorations.js +208 -0
- package/dist/workers/editor/common/lineEdit.js +75 -0
- package/dist/workers/editor/common/lineHeights.js +370 -0
- package/dist/workers/editor/common/linePart.js +25 -0
- package/dist/workers/editor/common/lineRange.js +312 -0
- package/dist/workers/editor/common/lineSequence.js +36 -0
- package/dist/workers/editor/common/lineTokens.js +405 -0
- package/dist/workers/editor/common/linesDiffComputer.js +29 -0
- package/dist/workers/editor/common/linesDiffComputers.js +13 -0
- package/dist/workers/editor/common/linesLayout.js +765 -0
- package/dist/workers/editor/common/linesSliceCharSequence.js +205 -0
- package/dist/workers/editor/common/linkComputer.js +269 -0
- package/dist/workers/editor/common/markerDecorations.js +9 -0
- package/dist/workers/editor/common/markerDecorationsService.js +248 -0
- package/dist/workers/editor/common/minimapTokensColorTracker.js +58 -0
- package/dist/workers/editor/common/mirrorTextModel.js +117 -0
- package/dist/workers/editor/common/model.js +9 -0
- package/dist/workers/editor/common/modelLineProjection.js +350 -0
- package/dist/workers/editor/common/modelLineProjectionData.js +297 -0
- package/dist/workers/editor/common/modelService.js +413 -0
- package/dist/workers/editor/common/modesRegistry.js +75 -0
- package/dist/workers/editor/common/monospaceLineBreaksComputer.js +473 -0
- package/dist/workers/editor/common/myersDiffAlgorithm.js +159 -0
- package/dist/workers/editor/common/nodeReader.js +127 -0
- package/dist/workers/editor/common/nullTokenize.js +29 -0
- package/dist/workers/editor/common/offsetRange.js +225 -0
- package/dist/workers/editor/common/onEnter.js +109 -0
- package/dist/workers/editor/common/oneCursor.js +117 -0
- package/dist/workers/editor/common/overviewZoneManager.js +176 -0
- package/dist/workers/editor/common/parser.js +121 -0
- package/dist/workers/editor/common/pieceTreeBase.js +1473 -0
- package/dist/workers/editor/common/pieceTreeTextBuffer.js +461 -0
- package/dist/workers/editor/common/pieceTreeTextBufferBuilder.js +140 -0
- package/dist/workers/editor/common/point.js +50 -0
- package/dist/workers/editor/common/position.js +142 -0
- package/dist/workers/editor/common/positionToOffset.js +17 -0
- package/dist/workers/editor/common/positionToOffsetImpl.js +98 -0
- package/dist/workers/editor/common/prefixSumComputer.js +226 -0
- package/dist/workers/editor/common/range.js +421 -0
- package/dist/workers/editor/common/rangeMapping.js +229 -0
- package/dist/workers/editor/common/rangeSingleLine.js +17 -0
- package/dist/workers/editor/common/rbTreeBase.js +362 -0
- package/dist/workers/editor/common/rect.js +163 -0
- package/dist/workers/editor/common/replaceCommand.js +158 -0
- package/dist/workers/editor/common/resolverService.js +5 -0
- package/dist/workers/editor/common/rgba.js +35 -0
- package/dist/workers/editor/common/richEditBrackets.js +356 -0
- package/dist/workers/editor/common/selection.js +145 -0
- package/dist/workers/editor/common/semanticTokensDto.js +82 -0
- package/dist/workers/editor/common/semanticTokensProviderStyling.js +263 -0
- package/dist/workers/editor/common/semanticTokensStyling.js +9 -0
- package/dist/workers/editor/common/semanticTokensStylingService.js +47 -0
- package/dist/workers/editor/common/shiftCommand.js +241 -0
- package/dist/workers/editor/common/smallImmutableSet.js +108 -0
- package/dist/workers/editor/common/sparseMultilineTokens.js +548 -0
- package/dist/workers/editor/common/sparseTokensStore.js +210 -0
- package/dist/workers/editor/common/standaloneEnums.js +1017 -0
- package/dist/workers/editor/common/standaloneStrings.js +42 -0
- package/dist/workers/editor/common/stringBuilder.js +122 -0
- package/dist/workers/editor/common/stringEdit.js +165 -0
- package/dist/workers/editor/common/supports.js +58 -0
- package/dist/workers/editor/common/surroundSelectionCommand.js +44 -0
- package/dist/workers/editor/common/textChange.js +248 -0
- package/dist/workers/editor/common/textEdit.js +269 -0
- package/dist/workers/editor/common/textLength.js +87 -0
- package/dist/workers/editor/common/textModel.js +2031 -0
- package/dist/workers/editor/common/textModelBracketPairs.js +45 -0
- package/dist/workers/editor/common/textModelDefaults.js +18 -0
- package/dist/workers/editor/common/textModelEditSource.js +166 -0
- package/dist/workers/editor/common/textModelEvents.js +216 -0
- package/dist/workers/editor/common/textModelGuides.js +40 -0
- package/dist/workers/editor/common/textModelPart.js +23 -0
- package/dist/workers/editor/common/textModelSearch.js +455 -0
- package/dist/workers/editor/common/textModelStringEdit.js +11 -0
- package/dist/workers/editor/common/textModelSync.impl.js +307 -0
- package/dist/workers/editor/common/textModelText.js +26 -0
- package/dist/workers/editor/common/textModelTokens.js +436 -0
- package/dist/workers/editor/common/textResourceConfiguration.js +6 -0
- package/dist/workers/editor/common/textToHtmlTokenizer.js +139 -0
- package/dist/workers/editor/common/tokenStore.js +407 -0
- package/dist/workers/editor/common/tokenWithTextArray.js +73 -0
- package/dist/workers/editor/common/tokenization.js +287 -0
- package/dist/workers/editor/common/tokenizationRegistry.js +123 -0
- package/dist/workers/editor/common/tokenizationTextModelPart.js +275 -0
- package/dist/workers/editor/common/tokenizer.js +301 -0
- package/dist/workers/editor/common/tokenizerSyntaxTokenBackend.js +261 -0
- package/dist/workers/editor/common/treeSitterLibraryService.js +9 -0
- package/dist/workers/editor/common/treeSitterSyntaxTokenBackend.js +167 -0
- package/dist/workers/editor/common/treeSitterThemeService.js +9 -0
- package/dist/workers/editor/common/treeSitterTokenizationImpl.js +713 -0
- package/dist/workers/editor/common/treeSitterTree.js +395 -0
- package/dist/workers/editor/common/treeViewsDnd.js +24 -0
- package/dist/workers/editor/common/treeViewsDndService.js +12 -0
- package/dist/workers/editor/common/trimTrailingWhitespaceCommand.js +98 -0
- package/dist/workers/editor/common/unicodeTextModelHighlighter.js +188 -0
- package/dist/workers/editor/common/utils.js +62 -0
- package/dist/workers/editor/common/viewContext.js +22 -0
- package/dist/workers/editor/common/viewEventHandler.js +186 -0
- package/dist/workers/editor/common/viewEvents.js +180 -0
- package/dist/workers/editor/common/viewLayout.js +368 -0
- package/dist/workers/editor/common/viewLineRenderer.js +948 -0
- package/dist/workers/editor/common/viewLinesViewportData.js +30 -0
- package/dist/workers/editor/common/viewModel.js +98 -0
- package/dist/workers/editor/common/viewModelDecoration.js +55 -0
- package/dist/workers/editor/common/viewModelDecorations.js +132 -0
- package/dist/workers/editor/common/viewModelEventDispatcher.js +398 -0
- package/dist/workers/editor/common/viewModelImpl.js +1163 -0
- package/dist/workers/editor/common/viewModelLines.js +938 -0
- package/dist/workers/editor/common/wordCharacterClassifier.js +87 -0
- package/dist/workers/editor/common/wordHelper.js +127 -0
- package/dist/workers/editor/editor.worker.js +11 -0
- package/dist/workers/language/css.worker.js +8 -0
- package/dist/workers/language/cssMode.js +198 -0
- package/dist/workers/language/cssWorker.js +183 -0
- package/dist/workers/language/html.worker.js +8 -0
- package/dist/workers/language/htmlMode.js +213 -0
- package/dist/workers/language/htmlWorker.js +126 -0
- package/dist/workers/language/json.worker.js +8 -0
- package/dist/workers/language/jsonMode.js +224 -0
- package/dist/workers/language/jsonWorker.js +187 -0
- package/dist/workers/language/languageFeatures.js +1009 -0
- package/dist/workers/language/lib.index.js +103 -0
- package/dist/workers/language/lib.js +1107 -0
- package/dist/workers/language/lspLanguageFeatures.js +716 -0
- package/dist/workers/language/monaco.contribution.js +144 -0
- package/dist/workers/language/tokenization.js +189 -0
- package/dist/workers/language/ts.worker.js +14 -0
- package/dist/workers/language/tsMode.js +212 -0
- package/dist/workers/language/tsWorker.js +352 -0
- package/dist/workers/language/typescriptServices.js +210154 -0
- package/dist/workers/language/typescriptServicesMetadata.js +3 -0
- package/dist/workers/language/workerManager.js +65 -0
- package/package.json +3 -2
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
import { Codicon } from '../../base/common/codicons.js';
|
|
2
|
+
import { URI } from '../../base/common/uri.js';
|
|
3
|
+
import { Range } from './core/range.js';
|
|
4
|
+
import { TokenizationRegistry as TokenizationRegistry$1 } from './tokenizationRegistry.js';
|
|
5
|
+
import { localize } from '../../nls.js';
|
|
6
|
+
|
|
7
|
+
class Token {
|
|
8
|
+
constructor(offset, type, language) {
|
|
9
|
+
this.offset = offset;
|
|
10
|
+
this.type = type;
|
|
11
|
+
this.language = language;
|
|
12
|
+
this._tokenBrand = undefined;
|
|
13
|
+
}
|
|
14
|
+
toString() {
|
|
15
|
+
return '(' + this.offset + ', ' + this.type + ')';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
class TokenizationResult {
|
|
22
|
+
constructor(tokens, endState) {
|
|
23
|
+
this.tokens = tokens;
|
|
24
|
+
this.endState = endState;
|
|
25
|
+
this._tokenizationResultBrand = undefined;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
class EncodedTokenizationResult {
|
|
32
|
+
constructor(
|
|
33
|
+
/**
|
|
34
|
+
* The tokens in binary format. Each token occupies two array indices. For token i:
|
|
35
|
+
* - at offset 2*i => startIndex
|
|
36
|
+
* - at offset 2*i + 1 => metadata
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
tokens, endState) {
|
|
40
|
+
this.tokens = tokens;
|
|
41
|
+
this.endState = endState;
|
|
42
|
+
this._encodedTokenizationResultBrand = undefined;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
var HoverVerbosityAction;
|
|
46
|
+
(function (HoverVerbosityAction) {
|
|
47
|
+
/**
|
|
48
|
+
* Increase the verbosity of the hover
|
|
49
|
+
*/
|
|
50
|
+
HoverVerbosityAction[HoverVerbosityAction["Increase"] = 0] = "Increase";
|
|
51
|
+
/**
|
|
52
|
+
* Decrease the verbosity of the hover
|
|
53
|
+
*/
|
|
54
|
+
HoverVerbosityAction[HoverVerbosityAction["Decrease"] = 1] = "Decrease";
|
|
55
|
+
})(HoverVerbosityAction || (HoverVerbosityAction = {}));
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
var CompletionItemKinds;
|
|
60
|
+
(function (CompletionItemKinds) {
|
|
61
|
+
const byKind = new Map();
|
|
62
|
+
byKind.set(0 /* CompletionItemKind.Method */, Codicon.symbolMethod);
|
|
63
|
+
byKind.set(1 /* CompletionItemKind.Function */, Codicon.symbolFunction);
|
|
64
|
+
byKind.set(2 /* CompletionItemKind.Constructor */, Codicon.symbolConstructor);
|
|
65
|
+
byKind.set(3 /* CompletionItemKind.Field */, Codicon.symbolField);
|
|
66
|
+
byKind.set(4 /* CompletionItemKind.Variable */, Codicon.symbolVariable);
|
|
67
|
+
byKind.set(5 /* CompletionItemKind.Class */, Codicon.symbolClass);
|
|
68
|
+
byKind.set(6 /* CompletionItemKind.Struct */, Codicon.symbolStruct);
|
|
69
|
+
byKind.set(7 /* CompletionItemKind.Interface */, Codicon.symbolInterface);
|
|
70
|
+
byKind.set(8 /* CompletionItemKind.Module */, Codicon.symbolModule);
|
|
71
|
+
byKind.set(9 /* CompletionItemKind.Property */, Codicon.symbolProperty);
|
|
72
|
+
byKind.set(10 /* CompletionItemKind.Event */, Codicon.symbolEvent);
|
|
73
|
+
byKind.set(11 /* CompletionItemKind.Operator */, Codicon.symbolOperator);
|
|
74
|
+
byKind.set(12 /* CompletionItemKind.Unit */, Codicon.symbolUnit);
|
|
75
|
+
byKind.set(13 /* CompletionItemKind.Value */, Codicon.symbolValue);
|
|
76
|
+
byKind.set(15 /* CompletionItemKind.Enum */, Codicon.symbolEnum);
|
|
77
|
+
byKind.set(14 /* CompletionItemKind.Constant */, Codicon.symbolConstant);
|
|
78
|
+
byKind.set(15 /* CompletionItemKind.Enum */, Codicon.symbolEnum);
|
|
79
|
+
byKind.set(16 /* CompletionItemKind.EnumMember */, Codicon.symbolEnumMember);
|
|
80
|
+
byKind.set(17 /* CompletionItemKind.Keyword */, Codicon.symbolKeyword);
|
|
81
|
+
byKind.set(28 /* CompletionItemKind.Snippet */, Codicon.symbolSnippet);
|
|
82
|
+
byKind.set(18 /* CompletionItemKind.Text */, Codicon.symbolText);
|
|
83
|
+
byKind.set(19 /* CompletionItemKind.Color */, Codicon.symbolColor);
|
|
84
|
+
byKind.set(20 /* CompletionItemKind.File */, Codicon.symbolFile);
|
|
85
|
+
byKind.set(21 /* CompletionItemKind.Reference */, Codicon.symbolReference);
|
|
86
|
+
byKind.set(22 /* CompletionItemKind.Customcolor */, Codicon.symbolCustomColor);
|
|
87
|
+
byKind.set(23 /* CompletionItemKind.Folder */, Codicon.symbolFolder);
|
|
88
|
+
byKind.set(24 /* CompletionItemKind.TypeParameter */, Codicon.symbolTypeParameter);
|
|
89
|
+
byKind.set(25 /* CompletionItemKind.User */, Codicon.account);
|
|
90
|
+
byKind.set(26 /* CompletionItemKind.Issue */, Codicon.issues);
|
|
91
|
+
byKind.set(27 /* CompletionItemKind.Tool */, Codicon.tools);
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
function toIcon(kind) {
|
|
96
|
+
let codicon = byKind.get(kind);
|
|
97
|
+
if (!codicon) {
|
|
98
|
+
console.info('No codicon found for CompletionItemKind ' + kind);
|
|
99
|
+
codicon = Codicon.symbolProperty;
|
|
100
|
+
}
|
|
101
|
+
return codicon;
|
|
102
|
+
}
|
|
103
|
+
CompletionItemKinds.toIcon = toIcon;
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
function toLabel(kind) {
|
|
108
|
+
switch (kind) {
|
|
109
|
+
case 0 /* CompletionItemKind.Method */: return localize(728, 'Method');
|
|
110
|
+
case 1 /* CompletionItemKind.Function */: return localize(729, 'Function');
|
|
111
|
+
case 2 /* CompletionItemKind.Constructor */: return localize(730, 'Constructor');
|
|
112
|
+
case 3 /* CompletionItemKind.Field */: return localize(731, 'Field');
|
|
113
|
+
case 4 /* CompletionItemKind.Variable */: return localize(732, 'Variable');
|
|
114
|
+
case 5 /* CompletionItemKind.Class */: return localize(733, 'Class');
|
|
115
|
+
case 6 /* CompletionItemKind.Struct */: return localize(734, 'Struct');
|
|
116
|
+
case 7 /* CompletionItemKind.Interface */: return localize(735, 'Interface');
|
|
117
|
+
case 8 /* CompletionItemKind.Module */: return localize(736, 'Module');
|
|
118
|
+
case 9 /* CompletionItemKind.Property */: return localize(737, 'Property');
|
|
119
|
+
case 10 /* CompletionItemKind.Event */: return localize(738, 'Event');
|
|
120
|
+
case 11 /* CompletionItemKind.Operator */: return localize(739, 'Operator');
|
|
121
|
+
case 12 /* CompletionItemKind.Unit */: return localize(740, 'Unit');
|
|
122
|
+
case 13 /* CompletionItemKind.Value */: return localize(741, 'Value');
|
|
123
|
+
case 14 /* CompletionItemKind.Constant */: return localize(742, 'Constant');
|
|
124
|
+
case 15 /* CompletionItemKind.Enum */: return localize(743, 'Enum');
|
|
125
|
+
case 16 /* CompletionItemKind.EnumMember */: return localize(744, 'Enum Member');
|
|
126
|
+
case 17 /* CompletionItemKind.Keyword */: return localize(745, 'Keyword');
|
|
127
|
+
case 18 /* CompletionItemKind.Text */: return localize(746, 'Text');
|
|
128
|
+
case 19 /* CompletionItemKind.Color */: return localize(747, 'Color');
|
|
129
|
+
case 20 /* CompletionItemKind.File */: return localize(748, 'File');
|
|
130
|
+
case 21 /* CompletionItemKind.Reference */: return localize(749, 'Reference');
|
|
131
|
+
case 22 /* CompletionItemKind.Customcolor */: return localize(750, 'Custom Color');
|
|
132
|
+
case 23 /* CompletionItemKind.Folder */: return localize(751, 'Folder');
|
|
133
|
+
case 24 /* CompletionItemKind.TypeParameter */: return localize(752, 'Type Parameter');
|
|
134
|
+
case 25 /* CompletionItemKind.User */: return localize(753, 'User');
|
|
135
|
+
case 26 /* CompletionItemKind.Issue */: return localize(754, 'Issue');
|
|
136
|
+
case 27 /* CompletionItemKind.Tool */: return localize(755, 'Tool');
|
|
137
|
+
case 28 /* CompletionItemKind.Snippet */: return localize(756, 'Snippet');
|
|
138
|
+
default: return '';
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
CompletionItemKinds.toLabel = toLabel;
|
|
142
|
+
const data = new Map();
|
|
143
|
+
data.set('method', 0 /* CompletionItemKind.Method */);
|
|
144
|
+
data.set('function', 1 /* CompletionItemKind.Function */);
|
|
145
|
+
data.set('constructor', 2 /* CompletionItemKind.Constructor */);
|
|
146
|
+
data.set('field', 3 /* CompletionItemKind.Field */);
|
|
147
|
+
data.set('variable', 4 /* CompletionItemKind.Variable */);
|
|
148
|
+
data.set('class', 5 /* CompletionItemKind.Class */);
|
|
149
|
+
data.set('struct', 6 /* CompletionItemKind.Struct */);
|
|
150
|
+
data.set('interface', 7 /* CompletionItemKind.Interface */);
|
|
151
|
+
data.set('module', 8 /* CompletionItemKind.Module */);
|
|
152
|
+
data.set('property', 9 /* CompletionItemKind.Property */);
|
|
153
|
+
data.set('event', 10 /* CompletionItemKind.Event */);
|
|
154
|
+
data.set('operator', 11 /* CompletionItemKind.Operator */);
|
|
155
|
+
data.set('unit', 12 /* CompletionItemKind.Unit */);
|
|
156
|
+
data.set('value', 13 /* CompletionItemKind.Value */);
|
|
157
|
+
data.set('constant', 14 /* CompletionItemKind.Constant */);
|
|
158
|
+
data.set('enum', 15 /* CompletionItemKind.Enum */);
|
|
159
|
+
data.set('enum-member', 16 /* CompletionItemKind.EnumMember */);
|
|
160
|
+
data.set('enumMember', 16 /* CompletionItemKind.EnumMember */);
|
|
161
|
+
data.set('keyword', 17 /* CompletionItemKind.Keyword */);
|
|
162
|
+
data.set('snippet', 28 /* CompletionItemKind.Snippet */);
|
|
163
|
+
data.set('text', 18 /* CompletionItemKind.Text */);
|
|
164
|
+
data.set('color', 19 /* CompletionItemKind.Color */);
|
|
165
|
+
data.set('file', 20 /* CompletionItemKind.File */);
|
|
166
|
+
data.set('reference', 21 /* CompletionItemKind.Reference */);
|
|
167
|
+
data.set('customcolor', 22 /* CompletionItemKind.Customcolor */);
|
|
168
|
+
data.set('folder', 23 /* CompletionItemKind.Folder */);
|
|
169
|
+
data.set('type-parameter', 24 /* CompletionItemKind.TypeParameter */);
|
|
170
|
+
data.set('typeParameter', 24 /* CompletionItemKind.TypeParameter */);
|
|
171
|
+
data.set('account', 25 /* CompletionItemKind.User */);
|
|
172
|
+
data.set('issue', 26 /* CompletionItemKind.Issue */);
|
|
173
|
+
data.set('tool', 27 /* CompletionItemKind.Tool */);
|
|
174
|
+
/**
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
function fromString(value, strict) {
|
|
178
|
+
let res = data.get(value);
|
|
179
|
+
if (typeof res === 'undefined' && !strict) {
|
|
180
|
+
res = 9 /* CompletionItemKind.Property */;
|
|
181
|
+
}
|
|
182
|
+
return res;
|
|
183
|
+
}
|
|
184
|
+
CompletionItemKinds.fromString = fromString;
|
|
185
|
+
})(CompletionItemKinds || (CompletionItemKinds = {}));
|
|
186
|
+
/**
|
|
187
|
+
* How an {@link InlineCompletionsProvider inline completion provider} was triggered.
|
|
188
|
+
*/
|
|
189
|
+
var InlineCompletionTriggerKind;
|
|
190
|
+
(function (InlineCompletionTriggerKind) {
|
|
191
|
+
/**
|
|
192
|
+
* Completion was triggered automatically while editing.
|
|
193
|
+
* It is sufficient to return a single completion item in this case.
|
|
194
|
+
*/
|
|
195
|
+
InlineCompletionTriggerKind[InlineCompletionTriggerKind["Automatic"] = 0] = "Automatic";
|
|
196
|
+
/**
|
|
197
|
+
* Completion was triggered explicitly by a user gesture.
|
|
198
|
+
* Return multiple completion items to enable cycling through them.
|
|
199
|
+
*/
|
|
200
|
+
InlineCompletionTriggerKind[InlineCompletionTriggerKind["Explicit"] = 1] = "Explicit";
|
|
201
|
+
})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));
|
|
202
|
+
class SelectedSuggestionInfo {
|
|
203
|
+
constructor(range, text, completionKind, isSnippetText) {
|
|
204
|
+
this.range = range;
|
|
205
|
+
this.text = text;
|
|
206
|
+
this.completionKind = completionKind;
|
|
207
|
+
this.isSnippetText = isSnippetText;
|
|
208
|
+
}
|
|
209
|
+
equals(other) {
|
|
210
|
+
return Range.lift(this.range).equalsRange(other.range)
|
|
211
|
+
&& this.text === other.text
|
|
212
|
+
&& this.completionKind === other.completionKind
|
|
213
|
+
&& this.isSnippetText === other.isSnippetText;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
var InlineCompletionHintStyle;
|
|
217
|
+
(function (InlineCompletionHintStyle) {
|
|
218
|
+
InlineCompletionHintStyle[InlineCompletionHintStyle["Code"] = 1] = "Code";
|
|
219
|
+
InlineCompletionHintStyle[InlineCompletionHintStyle["Label"] = 2] = "Label";
|
|
220
|
+
})(InlineCompletionHintStyle || (InlineCompletionHintStyle = {}));
|
|
221
|
+
/** @internal */
|
|
222
|
+
class ProviderId {
|
|
223
|
+
static fromExtensionId(extensionId) {
|
|
224
|
+
return new ProviderId(extensionId, undefined, undefined);
|
|
225
|
+
}
|
|
226
|
+
constructor(extensionId, extensionVersion, providerId) {
|
|
227
|
+
this.extensionId = extensionId;
|
|
228
|
+
this.extensionVersion = extensionVersion;
|
|
229
|
+
this.providerId = providerId;
|
|
230
|
+
}
|
|
231
|
+
toString() {
|
|
232
|
+
let result = '';
|
|
233
|
+
if (this.extensionId) {
|
|
234
|
+
result += this.extensionId;
|
|
235
|
+
}
|
|
236
|
+
if (this.extensionVersion) {
|
|
237
|
+
result += `@${this.extensionVersion}`;
|
|
238
|
+
}
|
|
239
|
+
if (this.providerId) {
|
|
240
|
+
result += `:${this.providerId}`;
|
|
241
|
+
}
|
|
242
|
+
if (result.length === 0) {
|
|
243
|
+
result = 'unknown';
|
|
244
|
+
}
|
|
245
|
+
return result;
|
|
246
|
+
}
|
|
247
|
+
toStringWithoutVersion() {
|
|
248
|
+
let result = '';
|
|
249
|
+
if (this.extensionId) {
|
|
250
|
+
result += this.extensionId;
|
|
251
|
+
}
|
|
252
|
+
if (this.providerId) {
|
|
253
|
+
result += `:${this.providerId}`;
|
|
254
|
+
}
|
|
255
|
+
return result;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
var InlineCompletionEndOfLifeReasonKind;
|
|
259
|
+
(function (InlineCompletionEndOfLifeReasonKind) {
|
|
260
|
+
InlineCompletionEndOfLifeReasonKind[InlineCompletionEndOfLifeReasonKind["Accepted"] = 0] = "Accepted";
|
|
261
|
+
InlineCompletionEndOfLifeReasonKind[InlineCompletionEndOfLifeReasonKind["Rejected"] = 1] = "Rejected";
|
|
262
|
+
InlineCompletionEndOfLifeReasonKind[InlineCompletionEndOfLifeReasonKind["Ignored"] = 2] = "Ignored";
|
|
263
|
+
})(InlineCompletionEndOfLifeReasonKind || (InlineCompletionEndOfLifeReasonKind = {}));
|
|
264
|
+
/**
|
|
265
|
+
* @internal
|
|
266
|
+
*/
|
|
267
|
+
var DocumentPasteTriggerKind;
|
|
268
|
+
(function (DocumentPasteTriggerKind) {
|
|
269
|
+
DocumentPasteTriggerKind[DocumentPasteTriggerKind["Automatic"] = 0] = "Automatic";
|
|
270
|
+
DocumentPasteTriggerKind[DocumentPasteTriggerKind["PasteAs"] = 1] = "PasteAs";
|
|
271
|
+
})(DocumentPasteTriggerKind || (DocumentPasteTriggerKind = {}));
|
|
272
|
+
var SignatureHelpTriggerKind;
|
|
273
|
+
(function (SignatureHelpTriggerKind) {
|
|
274
|
+
SignatureHelpTriggerKind[SignatureHelpTriggerKind["Invoke"] = 1] = "Invoke";
|
|
275
|
+
SignatureHelpTriggerKind[SignatureHelpTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
276
|
+
SignatureHelpTriggerKind[SignatureHelpTriggerKind["ContentChange"] = 3] = "ContentChange";
|
|
277
|
+
})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));
|
|
278
|
+
/**
|
|
279
|
+
* A document highlight kind.
|
|
280
|
+
*/
|
|
281
|
+
var DocumentHighlightKind;
|
|
282
|
+
(function (DocumentHighlightKind) {
|
|
283
|
+
/**
|
|
284
|
+
* A textual occurrence.
|
|
285
|
+
*/
|
|
286
|
+
DocumentHighlightKind[DocumentHighlightKind["Text"] = 0] = "Text";
|
|
287
|
+
/**
|
|
288
|
+
* Read-access of a symbol, like reading a variable.
|
|
289
|
+
*/
|
|
290
|
+
DocumentHighlightKind[DocumentHighlightKind["Read"] = 1] = "Read";
|
|
291
|
+
/**
|
|
292
|
+
* Write-access of a symbol, like writing to a variable.
|
|
293
|
+
*/
|
|
294
|
+
DocumentHighlightKind[DocumentHighlightKind["Write"] = 2] = "Write";
|
|
295
|
+
})(DocumentHighlightKind || (DocumentHighlightKind = {}));
|
|
296
|
+
/**
|
|
297
|
+
* @internal
|
|
298
|
+
*/
|
|
299
|
+
function isLocationLink(thing) {
|
|
300
|
+
return !!thing
|
|
301
|
+
&& URI.isUri(thing.uri)
|
|
302
|
+
&& Range.isIRange(thing.range)
|
|
303
|
+
&& (Range.isIRange(thing.originSelectionRange) || Range.isIRange(thing.targetSelectionRange));
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* @internal
|
|
307
|
+
*/
|
|
308
|
+
const symbolKindNames = {
|
|
309
|
+
[17 /* SymbolKind.Array */]: localize(757, "array"),
|
|
310
|
+
[16 /* SymbolKind.Boolean */]: localize(758, "boolean"),
|
|
311
|
+
[4 /* SymbolKind.Class */]: localize(759, "class"),
|
|
312
|
+
[13 /* SymbolKind.Constant */]: localize(760, "constant"),
|
|
313
|
+
[8 /* SymbolKind.Constructor */]: localize(761, "constructor"),
|
|
314
|
+
[9 /* SymbolKind.Enum */]: localize(762, "enumeration"),
|
|
315
|
+
[21 /* SymbolKind.EnumMember */]: localize(763, "enumeration member"),
|
|
316
|
+
[23 /* SymbolKind.Event */]: localize(764, "event"),
|
|
317
|
+
[7 /* SymbolKind.Field */]: localize(765, "field"),
|
|
318
|
+
[0 /* SymbolKind.File */]: localize(766, "file"),
|
|
319
|
+
[11 /* SymbolKind.Function */]: localize(767, "function"),
|
|
320
|
+
[10 /* SymbolKind.Interface */]: localize(768, "interface"),
|
|
321
|
+
[19 /* SymbolKind.Key */]: localize(769, "key"),
|
|
322
|
+
[5 /* SymbolKind.Method */]: localize(770, "method"),
|
|
323
|
+
[1 /* SymbolKind.Module */]: localize(771, "module"),
|
|
324
|
+
[2 /* SymbolKind.Namespace */]: localize(772, "namespace"),
|
|
325
|
+
[20 /* SymbolKind.Null */]: localize(773, "null"),
|
|
326
|
+
[15 /* SymbolKind.Number */]: localize(774, "number"),
|
|
327
|
+
[18 /* SymbolKind.Object */]: localize(775, "object"),
|
|
328
|
+
[24 /* SymbolKind.Operator */]: localize(776, "operator"),
|
|
329
|
+
[3 /* SymbolKind.Package */]: localize(777, "package"),
|
|
330
|
+
[6 /* SymbolKind.Property */]: localize(778, "property"),
|
|
331
|
+
[14 /* SymbolKind.String */]: localize(779, "string"),
|
|
332
|
+
[22 /* SymbolKind.Struct */]: localize(780, "struct"),
|
|
333
|
+
[25 /* SymbolKind.TypeParameter */]: localize(781, "type parameter"),
|
|
334
|
+
[12 /* SymbolKind.Variable */]: localize(782, "variable"),
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* @internal
|
|
338
|
+
*/
|
|
339
|
+
function getAriaLabelForSymbol(symbolName, kind) {
|
|
340
|
+
return localize(783, '{0} ({1})', symbolName, symbolKindNames[kind]);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* @internal
|
|
344
|
+
*/
|
|
345
|
+
var SymbolKinds;
|
|
346
|
+
(function (SymbolKinds) {
|
|
347
|
+
const byKind = new Map();
|
|
348
|
+
byKind.set(0 /* SymbolKind.File */, Codicon.symbolFile);
|
|
349
|
+
byKind.set(1 /* SymbolKind.Module */, Codicon.symbolModule);
|
|
350
|
+
byKind.set(2 /* SymbolKind.Namespace */, Codicon.symbolNamespace);
|
|
351
|
+
byKind.set(3 /* SymbolKind.Package */, Codicon.symbolPackage);
|
|
352
|
+
byKind.set(4 /* SymbolKind.Class */, Codicon.symbolClass);
|
|
353
|
+
byKind.set(5 /* SymbolKind.Method */, Codicon.symbolMethod);
|
|
354
|
+
byKind.set(6 /* SymbolKind.Property */, Codicon.symbolProperty);
|
|
355
|
+
byKind.set(7 /* SymbolKind.Field */, Codicon.symbolField);
|
|
356
|
+
byKind.set(8 /* SymbolKind.Constructor */, Codicon.symbolConstructor);
|
|
357
|
+
byKind.set(9 /* SymbolKind.Enum */, Codicon.symbolEnum);
|
|
358
|
+
byKind.set(10 /* SymbolKind.Interface */, Codicon.symbolInterface);
|
|
359
|
+
byKind.set(11 /* SymbolKind.Function */, Codicon.symbolFunction);
|
|
360
|
+
byKind.set(12 /* SymbolKind.Variable */, Codicon.symbolVariable);
|
|
361
|
+
byKind.set(13 /* SymbolKind.Constant */, Codicon.symbolConstant);
|
|
362
|
+
byKind.set(14 /* SymbolKind.String */, Codicon.symbolString);
|
|
363
|
+
byKind.set(15 /* SymbolKind.Number */, Codicon.symbolNumber);
|
|
364
|
+
byKind.set(16 /* SymbolKind.Boolean */, Codicon.symbolBoolean);
|
|
365
|
+
byKind.set(17 /* SymbolKind.Array */, Codicon.symbolArray);
|
|
366
|
+
byKind.set(18 /* SymbolKind.Object */, Codicon.symbolObject);
|
|
367
|
+
byKind.set(19 /* SymbolKind.Key */, Codicon.symbolKey);
|
|
368
|
+
byKind.set(20 /* SymbolKind.Null */, Codicon.symbolNull);
|
|
369
|
+
byKind.set(21 /* SymbolKind.EnumMember */, Codicon.symbolEnumMember);
|
|
370
|
+
byKind.set(22 /* SymbolKind.Struct */, Codicon.symbolStruct);
|
|
371
|
+
byKind.set(23 /* SymbolKind.Event */, Codicon.symbolEvent);
|
|
372
|
+
byKind.set(24 /* SymbolKind.Operator */, Codicon.symbolOperator);
|
|
373
|
+
byKind.set(25 /* SymbolKind.TypeParameter */, Codicon.symbolTypeParameter);
|
|
374
|
+
/**
|
|
375
|
+
* @internal
|
|
376
|
+
*/
|
|
377
|
+
function toIcon(kind) {
|
|
378
|
+
let icon = byKind.get(kind);
|
|
379
|
+
if (!icon) {
|
|
380
|
+
console.info('No codicon found for SymbolKind ' + kind);
|
|
381
|
+
icon = Codicon.symbolProperty;
|
|
382
|
+
}
|
|
383
|
+
return icon;
|
|
384
|
+
}
|
|
385
|
+
SymbolKinds.toIcon = toIcon;
|
|
386
|
+
const byCompletionKind = new Map();
|
|
387
|
+
byCompletionKind.set(0 /* SymbolKind.File */, 20 /* CompletionItemKind.File */);
|
|
388
|
+
byCompletionKind.set(1 /* SymbolKind.Module */, 8 /* CompletionItemKind.Module */);
|
|
389
|
+
byCompletionKind.set(2 /* SymbolKind.Namespace */, 8 /* CompletionItemKind.Module */);
|
|
390
|
+
byCompletionKind.set(3 /* SymbolKind.Package */, 8 /* CompletionItemKind.Module */);
|
|
391
|
+
byCompletionKind.set(4 /* SymbolKind.Class */, 5 /* CompletionItemKind.Class */);
|
|
392
|
+
byCompletionKind.set(5 /* SymbolKind.Method */, 0 /* CompletionItemKind.Method */);
|
|
393
|
+
byCompletionKind.set(6 /* SymbolKind.Property */, 9 /* CompletionItemKind.Property */);
|
|
394
|
+
byCompletionKind.set(7 /* SymbolKind.Field */, 3 /* CompletionItemKind.Field */);
|
|
395
|
+
byCompletionKind.set(8 /* SymbolKind.Constructor */, 2 /* CompletionItemKind.Constructor */);
|
|
396
|
+
byCompletionKind.set(9 /* SymbolKind.Enum */, 15 /* CompletionItemKind.Enum */);
|
|
397
|
+
byCompletionKind.set(10 /* SymbolKind.Interface */, 7 /* CompletionItemKind.Interface */);
|
|
398
|
+
byCompletionKind.set(11 /* SymbolKind.Function */, 1 /* CompletionItemKind.Function */);
|
|
399
|
+
byCompletionKind.set(12 /* SymbolKind.Variable */, 4 /* CompletionItemKind.Variable */);
|
|
400
|
+
byCompletionKind.set(13 /* SymbolKind.Constant */, 14 /* CompletionItemKind.Constant */);
|
|
401
|
+
byCompletionKind.set(14 /* SymbolKind.String */, 18 /* CompletionItemKind.Text */);
|
|
402
|
+
byCompletionKind.set(15 /* SymbolKind.Number */, 13 /* CompletionItemKind.Value */);
|
|
403
|
+
byCompletionKind.set(16 /* SymbolKind.Boolean */, 13 /* CompletionItemKind.Value */);
|
|
404
|
+
byCompletionKind.set(17 /* SymbolKind.Array */, 13 /* CompletionItemKind.Value */);
|
|
405
|
+
byCompletionKind.set(18 /* SymbolKind.Object */, 13 /* CompletionItemKind.Value */);
|
|
406
|
+
byCompletionKind.set(19 /* SymbolKind.Key */, 17 /* CompletionItemKind.Keyword */);
|
|
407
|
+
byCompletionKind.set(20 /* SymbolKind.Null */, 13 /* CompletionItemKind.Value */);
|
|
408
|
+
byCompletionKind.set(21 /* SymbolKind.EnumMember */, 16 /* CompletionItemKind.EnumMember */);
|
|
409
|
+
byCompletionKind.set(22 /* SymbolKind.Struct */, 6 /* CompletionItemKind.Struct */);
|
|
410
|
+
byCompletionKind.set(23 /* SymbolKind.Event */, 10 /* CompletionItemKind.Event */);
|
|
411
|
+
byCompletionKind.set(24 /* SymbolKind.Operator */, 11 /* CompletionItemKind.Operator */);
|
|
412
|
+
byCompletionKind.set(25 /* SymbolKind.TypeParameter */, 24 /* CompletionItemKind.TypeParameter */);
|
|
413
|
+
/**
|
|
414
|
+
* @internal
|
|
415
|
+
*/
|
|
416
|
+
function toCompletionKind(kind) {
|
|
417
|
+
let completionKind = byCompletionKind.get(kind);
|
|
418
|
+
if (completionKind === undefined) {
|
|
419
|
+
console.info('No completion kind found for SymbolKind ' + kind);
|
|
420
|
+
completionKind = 20 /* CompletionItemKind.File */;
|
|
421
|
+
}
|
|
422
|
+
return completionKind;
|
|
423
|
+
}
|
|
424
|
+
SymbolKinds.toCompletionKind = toCompletionKind;
|
|
425
|
+
})(SymbolKinds || (SymbolKinds = {}));
|
|
426
|
+
class FoldingRangeKind {
|
|
427
|
+
/**
|
|
428
|
+
* Kind for folding range representing a comment. The value of the kind is 'comment'.
|
|
429
|
+
*/
|
|
430
|
+
static { this.Comment = new FoldingRangeKind('comment'); }
|
|
431
|
+
/**
|
|
432
|
+
* Kind for folding range representing a import. The value of the kind is 'imports'.
|
|
433
|
+
*/
|
|
434
|
+
static { this.Imports = new FoldingRangeKind('imports'); }
|
|
435
|
+
/**
|
|
436
|
+
* Kind for folding range representing regions (for example marked by `#region`, `#endregion`).
|
|
437
|
+
* The value of the kind is 'region'.
|
|
438
|
+
*/
|
|
439
|
+
static { this.Region = new FoldingRangeKind('region'); }
|
|
440
|
+
/**
|
|
441
|
+
* Returns a {@link FoldingRangeKind} for the given value.
|
|
442
|
+
*
|
|
443
|
+
* @param value of the kind.
|
|
444
|
+
*/
|
|
445
|
+
static fromValue(value) {
|
|
446
|
+
switch (value) {
|
|
447
|
+
case 'comment': return FoldingRangeKind.Comment;
|
|
448
|
+
case 'imports': return FoldingRangeKind.Imports;
|
|
449
|
+
case 'region': return FoldingRangeKind.Region;
|
|
450
|
+
}
|
|
451
|
+
return new FoldingRangeKind(value);
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Creates a new {@link FoldingRangeKind}.
|
|
455
|
+
*
|
|
456
|
+
* @param value of the kind.
|
|
457
|
+
*/
|
|
458
|
+
constructor(value) {
|
|
459
|
+
this.value = value;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
var NewSymbolNameTag;
|
|
463
|
+
(function (NewSymbolNameTag) {
|
|
464
|
+
NewSymbolNameTag[NewSymbolNameTag["AIGenerated"] = 1] = "AIGenerated";
|
|
465
|
+
})(NewSymbolNameTag || (NewSymbolNameTag = {}));
|
|
466
|
+
var NewSymbolNameTriggerKind;
|
|
467
|
+
(function (NewSymbolNameTriggerKind) {
|
|
468
|
+
NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Invoke"] = 0] = "Invoke";
|
|
469
|
+
NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Automatic"] = 1] = "Automatic";
|
|
470
|
+
})(NewSymbolNameTriggerKind || (NewSymbolNameTriggerKind = {}));
|
|
471
|
+
/**
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
var Command;
|
|
475
|
+
(function (Command) {
|
|
476
|
+
/**
|
|
477
|
+
* @internal
|
|
478
|
+
*/
|
|
479
|
+
function is(obj) {
|
|
480
|
+
if (!obj || typeof obj !== 'object') {
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
return typeof obj.id === 'string' &&
|
|
484
|
+
typeof obj.title === 'string';
|
|
485
|
+
}
|
|
486
|
+
Command.is = is;
|
|
487
|
+
})(Command || (Command = {}));
|
|
488
|
+
var InlayHintKind;
|
|
489
|
+
(function (InlayHintKind) {
|
|
490
|
+
InlayHintKind[InlayHintKind["Type"] = 1] = "Type";
|
|
491
|
+
InlayHintKind[InlayHintKind["Parameter"] = 2] = "Parameter";
|
|
492
|
+
})(InlayHintKind || (InlayHintKind = {}));
|
|
493
|
+
/**
|
|
494
|
+
* @internal
|
|
495
|
+
*/
|
|
496
|
+
class LazyTokenizationSupport {
|
|
497
|
+
constructor(createSupport) {
|
|
498
|
+
this.createSupport = createSupport;
|
|
499
|
+
this._tokenizationSupport = null;
|
|
500
|
+
}
|
|
501
|
+
dispose() {
|
|
502
|
+
if (this._tokenizationSupport) {
|
|
503
|
+
this._tokenizationSupport.then((support) => {
|
|
504
|
+
if (support) {
|
|
505
|
+
support.dispose();
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
get tokenizationSupport() {
|
|
511
|
+
if (!this._tokenizationSupport) {
|
|
512
|
+
this._tokenizationSupport = this.createSupport();
|
|
513
|
+
}
|
|
514
|
+
return this._tokenizationSupport;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* @internal
|
|
519
|
+
*/
|
|
520
|
+
const TokenizationRegistry = new TokenizationRegistry$1();
|
|
521
|
+
|
|
522
|
+
export { Command, CompletionItemKinds, DocumentHighlightKind, DocumentPasteTriggerKind, EncodedTokenizationResult, FoldingRangeKind, HoverVerbosityAction, InlayHintKind, InlineCompletionEndOfLifeReasonKind, InlineCompletionHintStyle, InlineCompletionTriggerKind, LazyTokenizationSupport, NewSymbolNameTag, NewSymbolNameTriggerKind, ProviderId, SelectedSuggestionInfo, SignatureHelpTriggerKind, SymbolKinds, Token, TokenizationRegistry, TokenizationResult, getAriaLabelForSymbol, isLocationLink, symbolKindNames };
|