monaco-editor11 1.0.9 → 1.1.0
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/index.d.ts +1 -1
- package/dist/monaco-editor11.es.js +11 -16
- package/dist/monaco-editor11.umd.js +1 -1
- package/package.json +2 -2
- package/dist/monaco.d.ts +0 -8
- package/dist/workers/common/initialize.js +0 -16
- package/dist/workers/common/workers.js +0 -141
- package/dist/workers/editor/common/abstractSyntaxTokenBackend.js +0 -128
- package/dist/workers/editor/common/abstractText.js +0 -89
- package/dist/workers/editor/common/ast.js +0 -485
- package/dist/workers/editor/common/autoIndent.js +0 -390
- package/dist/workers/editor/common/beforeEditPositionMapper.js +0 -110
- package/dist/workers/editor/common/bracketPairsImpl.js +0 -717
- package/dist/workers/editor/common/bracketPairsTree.js +0 -343
- package/dist/workers/editor/common/brackets.js +0 -108
- package/dist/workers/editor/common/characterClassifier.js +0 -59
- package/dist/workers/editor/common/characterPair.js +0 -40
- package/dist/workers/editor/common/colorizedBracketPairsDecorationProvider.js +0 -97
- package/dist/workers/editor/common/columnRange.js +0 -35
- package/dist/workers/editor/common/combineTextEditInfos.js +0 -124
- package/dist/workers/editor/common/common.js +0 -20
- package/dist/workers/editor/common/computeMovedLines.js +0 -249
- package/dist/workers/editor/common/concat23Trees.js +0 -192
- package/dist/workers/editor/common/contiguousMultilineTokens.js +0 -32
- package/dist/workers/editor/common/contiguousMultilineTokensBuilder.js +0 -23
- package/dist/workers/editor/common/contiguousTokensEditing.js +0 -128
- package/dist/workers/editor/common/contiguousTokensStore.js +0 -207
- package/dist/workers/editor/common/coordinatesConverter.js +0 -51
- package/dist/workers/editor/common/cursor.js +0 -899
- package/dist/workers/editor/common/cursorAtomicMoveOperations.js +0 -145
- package/dist/workers/editor/common/cursorCollection.js +0 -194
- package/dist/workers/editor/common/cursorColumnSelection.js +0 -93
- package/dist/workers/editor/common/cursorColumns.js +0 -112
- package/dist/workers/editor/common/cursorCommon.js +0 -250
- package/dist/workers/editor/common/cursorContext.js +0 -15
- package/dist/workers/editor/common/cursorDeleteOperations.js +0 -231
- package/dist/workers/editor/common/cursorMoveCommands.js +0 -676
- package/dist/workers/editor/common/cursorMoveOperations.js +0 -290
- package/dist/workers/editor/common/cursorTypeEditOperations.js +0 -968
- package/dist/workers/editor/common/cursorTypeOperations.js +0 -173
- package/dist/workers/editor/common/cursorUtils.js +0 -75
- package/dist/workers/editor/common/cursorWordOperations.js +0 -720
- package/dist/workers/editor/common/defaultDocumentColorsComputer.js +0 -138
- package/dist/workers/editor/common/defaultLinesDiffComputer.js +0 -188
- package/dist/workers/editor/common/diffAlgorithm.js +0 -139
- package/dist/workers/editor/common/diffEditor.js +0 -38
- package/dist/workers/editor/common/dynamicProgrammingDiffing.js +0 -101
- package/dist/workers/editor/common/edit.js +0 -183
- package/dist/workers/editor/common/editOperation.js +0 -36
- package/dist/workers/editor/common/editStack.js +0 -363
- package/dist/workers/editor/common/editorAction.js +0 -26
- package/dist/workers/editor/common/editorBaseApi.js +0 -43
- package/dist/workers/editor/common/editorColorRegistry.js +0 -102
- package/dist/workers/editor/common/editorCommon.js +0 -13
- package/dist/workers/editor/common/editorConfigurationSchema.js +0 -338
- package/dist/workers/editor/common/editorContextKeys.js +0 -84
- package/dist/workers/editor/common/editorFeatures.js +0 -17
- package/dist/workers/editor/common/editorOptions.js +0 -3440
- package/dist/workers/editor/common/editorTheme.js +0 -23
- package/dist/workers/editor/common/editorWebWorker.js +0 -299
- package/dist/workers/editor/common/editorWorker.js +0 -9
- package/dist/workers/editor/common/editorWorkerHost.js +0 -15
- package/dist/workers/editor/common/editorZoom.js +0 -26
- package/dist/workers/editor/common/electricCharacter.js +0 -55
- package/dist/workers/editor/common/encodedTokenAttributes.js +0 -79
- package/dist/workers/editor/common/enterAction.js +0 -53
- package/dist/workers/editor/common/eolCounter.js +0 -44
- package/dist/workers/editor/common/findSectionHeaders.js +0 -128
- package/dist/workers/editor/common/fixBrackets.js +0 -67
- package/dist/workers/editor/common/fixedArray.js +0 -70
- package/dist/workers/editor/common/fontInfo.js +0 -172
- package/dist/workers/editor/common/fontInfoFromSettings.js +0 -29
- package/dist/workers/editor/common/getIconClasses.js +0 -106
- package/dist/workers/editor/common/getPositionOffsetTransformerFromTextModel.js +0 -24
- package/dist/workers/editor/common/glyphLanesModel.js +0 -61
- package/dist/workers/editor/common/guidesTextModelPart.js +0 -405
- package/dist/workers/editor/common/heuristicSequenceOptimizations.js +0 -374
- package/dist/workers/editor/common/indentRules.js +0 -63
- package/dist/workers/editor/common/indentation.js +0 -39
- package/dist/workers/editor/common/indentationGuesser.js +0 -178
- package/dist/workers/editor/common/indentationLineProcessor.js +0 -193
- package/dist/workers/editor/common/inlineDecorations.js +0 -26
- package/dist/workers/editor/common/inplaceReplaceSupport.js +0 -87
- package/dist/workers/editor/common/inputMode.js +0 -22
- package/dist/workers/editor/common/intervalTree.js +0 -1002
- package/dist/workers/editor/common/language.js +0 -9
- package/dist/workers/editor/common/languageBracketsConfiguration.js +0 -133
- package/dist/workers/editor/common/languageConfiguration.js +0 -138
- package/dist/workers/editor/common/languageConfigurationRegistry.js +0 -361
- package/dist/workers/editor/common/languageFeatureDebounce.js +0 -137
- package/dist/workers/editor/common/languageFeatureRegistry.js +0 -180
- package/dist/workers/editor/common/languageFeatures.js +0 -9
- package/dist/workers/editor/common/languageFeaturesService.js +0 -47
- package/dist/workers/editor/common/languageSelector.js +0 -112
- package/dist/workers/editor/common/languageService.js +0 -92
- package/dist/workers/editor/common/languages.js +0 -522
- package/dist/workers/editor/common/languagesAssociations.js +0 -193
- package/dist/workers/editor/common/languagesRegistry.js +0 -237
- package/dist/workers/editor/common/legacyLinesDiffComputer.js +0 -468
- package/dist/workers/editor/common/length.js +0 -129
- package/dist/workers/editor/common/lineDecorations.js +0 -208
- package/dist/workers/editor/common/lineEdit.js +0 -75
- package/dist/workers/editor/common/lineHeights.js +0 -370
- package/dist/workers/editor/common/linePart.js +0 -25
- package/dist/workers/editor/common/lineRange.js +0 -312
- package/dist/workers/editor/common/lineSequence.js +0 -36
- package/dist/workers/editor/common/lineTokens.js +0 -405
- package/dist/workers/editor/common/linesDiffComputer.js +0 -29
- package/dist/workers/editor/common/linesDiffComputers.js +0 -13
- package/dist/workers/editor/common/linesLayout.js +0 -765
- package/dist/workers/editor/common/linesSliceCharSequence.js +0 -205
- package/dist/workers/editor/common/linkComputer.js +0 -269
- package/dist/workers/editor/common/markerDecorations.js +0 -9
- package/dist/workers/editor/common/markerDecorationsService.js +0 -248
- package/dist/workers/editor/common/minimapTokensColorTracker.js +0 -58
- package/dist/workers/editor/common/mirrorTextModel.js +0 -117
- package/dist/workers/editor/common/model.js +0 -9
- package/dist/workers/editor/common/modelLineProjection.js +0 -350
- package/dist/workers/editor/common/modelLineProjectionData.js +0 -297
- package/dist/workers/editor/common/modelService.js +0 -413
- package/dist/workers/editor/common/modesRegistry.js +0 -75
- package/dist/workers/editor/common/monospaceLineBreaksComputer.js +0 -473
- package/dist/workers/editor/common/myersDiffAlgorithm.js +0 -159
- package/dist/workers/editor/common/nodeReader.js +0 -127
- package/dist/workers/editor/common/nullTokenize.js +0 -29
- package/dist/workers/editor/common/offsetRange.js +0 -225
- package/dist/workers/editor/common/onEnter.js +0 -109
- package/dist/workers/editor/common/oneCursor.js +0 -117
- package/dist/workers/editor/common/overviewZoneManager.js +0 -176
- package/dist/workers/editor/common/parser.js +0 -121
- package/dist/workers/editor/common/pieceTreeBase.js +0 -1473
- package/dist/workers/editor/common/pieceTreeTextBuffer.js +0 -461
- package/dist/workers/editor/common/pieceTreeTextBufferBuilder.js +0 -140
- package/dist/workers/editor/common/point.js +0 -50
- package/dist/workers/editor/common/position.js +0 -142
- package/dist/workers/editor/common/positionToOffset.js +0 -17
- package/dist/workers/editor/common/positionToOffsetImpl.js +0 -98
- package/dist/workers/editor/common/prefixSumComputer.js +0 -226
- package/dist/workers/editor/common/range.js +0 -421
- package/dist/workers/editor/common/rangeMapping.js +0 -229
- package/dist/workers/editor/common/rangeSingleLine.js +0 -17
- package/dist/workers/editor/common/rbTreeBase.js +0 -362
- package/dist/workers/editor/common/rect.js +0 -163
- package/dist/workers/editor/common/replaceCommand.js +0 -158
- package/dist/workers/editor/common/resolverService.js +0 -5
- package/dist/workers/editor/common/rgba.js +0 -35
- package/dist/workers/editor/common/richEditBrackets.js +0 -356
- package/dist/workers/editor/common/selection.js +0 -145
- package/dist/workers/editor/common/semanticTokensDto.js +0 -82
- package/dist/workers/editor/common/semanticTokensProviderStyling.js +0 -263
- package/dist/workers/editor/common/semanticTokensStyling.js +0 -9
- package/dist/workers/editor/common/semanticTokensStylingService.js +0 -47
- package/dist/workers/editor/common/shiftCommand.js +0 -241
- package/dist/workers/editor/common/smallImmutableSet.js +0 -108
- package/dist/workers/editor/common/sparseMultilineTokens.js +0 -548
- package/dist/workers/editor/common/sparseTokensStore.js +0 -210
- package/dist/workers/editor/common/standaloneEnums.js +0 -1017
- package/dist/workers/editor/common/standaloneStrings.js +0 -42
- package/dist/workers/editor/common/stringBuilder.js +0 -122
- package/dist/workers/editor/common/stringEdit.js +0 -165
- package/dist/workers/editor/common/supports.js +0 -58
- package/dist/workers/editor/common/surroundSelectionCommand.js +0 -44
- package/dist/workers/editor/common/textChange.js +0 -248
- package/dist/workers/editor/common/textEdit.js +0 -269
- package/dist/workers/editor/common/textLength.js +0 -87
- package/dist/workers/editor/common/textModel.js +0 -2031
- package/dist/workers/editor/common/textModelBracketPairs.js +0 -45
- package/dist/workers/editor/common/textModelDefaults.js +0 -18
- package/dist/workers/editor/common/textModelEditSource.js +0 -166
- package/dist/workers/editor/common/textModelEvents.js +0 -216
- package/dist/workers/editor/common/textModelGuides.js +0 -40
- package/dist/workers/editor/common/textModelPart.js +0 -23
- package/dist/workers/editor/common/textModelSearch.js +0 -455
- package/dist/workers/editor/common/textModelStringEdit.js +0 -11
- package/dist/workers/editor/common/textModelSync.impl.js +0 -307
- package/dist/workers/editor/common/textModelText.js +0 -26
- package/dist/workers/editor/common/textModelTokens.js +0 -436
- package/dist/workers/editor/common/textResourceConfiguration.js +0 -6
- package/dist/workers/editor/common/textToHtmlTokenizer.js +0 -139
- package/dist/workers/editor/common/tokenStore.js +0 -407
- package/dist/workers/editor/common/tokenWithTextArray.js +0 -73
- package/dist/workers/editor/common/tokenization.js +0 -287
- package/dist/workers/editor/common/tokenizationRegistry.js +0 -123
- package/dist/workers/editor/common/tokenizationTextModelPart.js +0 -275
- package/dist/workers/editor/common/tokenizer.js +0 -301
- package/dist/workers/editor/common/tokenizerSyntaxTokenBackend.js +0 -261
- package/dist/workers/editor/common/treeSitterLibraryService.js +0 -9
- package/dist/workers/editor/common/treeSitterSyntaxTokenBackend.js +0 -167
- package/dist/workers/editor/common/treeSitterThemeService.js +0 -9
- package/dist/workers/editor/common/treeSitterTokenizationImpl.js +0 -713
- package/dist/workers/editor/common/treeSitterTree.js +0 -395
- package/dist/workers/editor/common/treeViewsDnd.js +0 -24
- package/dist/workers/editor/common/treeViewsDndService.js +0 -12
- package/dist/workers/editor/common/trimTrailingWhitespaceCommand.js +0 -98
- package/dist/workers/editor/common/unicodeTextModelHighlighter.js +0 -188
- package/dist/workers/editor/common/utils.js +0 -62
- package/dist/workers/editor/common/viewContext.js +0 -22
- package/dist/workers/editor/common/viewEventHandler.js +0 -186
- package/dist/workers/editor/common/viewEvents.js +0 -180
- package/dist/workers/editor/common/viewLayout.js +0 -368
- package/dist/workers/editor/common/viewLineRenderer.js +0 -948
- package/dist/workers/editor/common/viewLinesViewportData.js +0 -30
- package/dist/workers/editor/common/viewModel.js +0 -98
- package/dist/workers/editor/common/viewModelDecoration.js +0 -55
- package/dist/workers/editor/common/viewModelDecorations.js +0 -132
- package/dist/workers/editor/common/viewModelEventDispatcher.js +0 -398
- package/dist/workers/editor/common/viewModelImpl.js +0 -1163
- package/dist/workers/editor/common/viewModelLines.js +0 -938
- package/dist/workers/editor/common/wordCharacterClassifier.js +0 -87
- package/dist/workers/editor/common/wordHelper.js +0 -127
- package/dist/workers/language/cssMode.js +0 -198
- package/dist/workers/language/cssWorker.js +0 -183
- package/dist/workers/language/htmlMode.js +0 -213
- package/dist/workers/language/htmlWorker.js +0 -126
- package/dist/workers/language/jsonMode.js +0 -224
- package/dist/workers/language/jsonWorker.js +0 -187
- package/dist/workers/language/languageFeatures.js +0 -1009
- package/dist/workers/language/lib.index.js +0 -103
- package/dist/workers/language/lib.js +0 -1107
- package/dist/workers/language/lspLanguageFeatures.js +0 -716
- package/dist/workers/language/monaco.contribution.js +0 -144
- package/dist/workers/language/tokenization.js +0 -189
- package/dist/workers/language/tsMode.js +0 -212
- package/dist/workers/language/tsWorker.js +0 -352
- package/dist/workers/language/typescriptServices.js +0 -210154
- package/dist/workers/language/typescriptServicesMetadata.js +0 -3
- package/dist/workers/language/workerManager.js +0 -65
- /package/dist/workers/{language/css.worker.js → css.worker.js} +0 -0
- /package/dist/workers/{editor/editor.worker.js → editor.worker.js} +0 -0
- /package/dist/workers/{language/html.worker.js → html.worker.js} +0 -0
- /package/dist/workers/{language/json.worker.js → json.worker.js} +0 -0
- /package/dist/workers/{language/ts.worker.js → ts.worker.js} +0 -0
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import '../../editor/browser/coreCommands.js';
|
|
2
|
-
import '../../editor/browser/widget/codeEditor/codeEditorWidget.js';
|
|
3
|
-
import '../../editor/browser/widget/diffEditor/diffEditor.contribution.js';
|
|
4
|
-
import '../../editor/contrib/anchorSelect/browser/anchorSelect.js';
|
|
5
|
-
import '../../editor/contrib/bracketMatching/browser/bracketMatching.js';
|
|
6
|
-
import '../../editor/contrib/caretOperations/browser/caretOperations.js';
|
|
7
|
-
import '../../editor/contrib/caretOperations/browser/transpose.js';
|
|
8
|
-
import '../../editor/contrib/clipboard/browser/clipboard.js';
|
|
9
|
-
import '../../editor/contrib/codeAction/browser/codeActionContributions.js';
|
|
10
|
-
import '../../editor/contrib/codelens/browser/codelensController.js';
|
|
11
|
-
import '../../editor/contrib/colorPicker/browser/colorPickerContribution.js';
|
|
12
|
-
import '../../editor/contrib/comment/browser/comment.js';
|
|
13
|
-
import '../../editor/contrib/contextmenu/browser/contextmenu.js';
|
|
14
|
-
import '../../editor/contrib/cursorUndo/browser/cursorUndo.js';
|
|
15
|
-
import '../../editor/contrib/dnd/browser/dnd.js';
|
|
16
|
-
import '../../editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js';
|
|
17
|
-
import '../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js';
|
|
18
|
-
import '../../editor/contrib/find/browser/findController.js';
|
|
19
|
-
import '../../editor/contrib/folding/browser/folding.js';
|
|
20
|
-
import '../../editor/contrib/fontZoom/browser/fontZoom.js';
|
|
21
|
-
import '../../editor/contrib/format/browser/formatActions.js';
|
|
22
|
-
import '../../editor/contrib/documentSymbols/browser/documentSymbols.js';
|
|
23
|
-
import '../../editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js';
|
|
24
|
-
import '../../editor/contrib/inlineProgress/browser/inlineProgress.js';
|
|
25
|
-
import '../../editor/contrib/gotoSymbol/browser/goToCommands.js';
|
|
26
|
-
import '../../editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js';
|
|
27
|
-
import '../../editor/contrib/gotoError/browser/gotoError.js';
|
|
28
|
-
import '../../editor/contrib/gpu/browser/gpuActions.js';
|
|
29
|
-
import '../../editor/contrib/hover/browser/hoverContribution.js';
|
|
30
|
-
import '../../editor/contrib/indentation/browser/indentation.js';
|
|
31
|
-
import '../../editor/contrib/inlayHints/browser/inlayHintsContribution.js';
|
|
32
|
-
import '../../editor/contrib/inPlaceReplace/browser/inPlaceReplace.js';
|
|
33
|
-
import '../../editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js';
|
|
34
|
-
import '../../editor/contrib/lineSelection/browser/lineSelection.js';
|
|
35
|
-
import '../../editor/contrib/linesOperations/browser/linesOperations.js';
|
|
36
|
-
import '../../editor/contrib/linkedEditing/browser/linkedEditing.js';
|
|
37
|
-
import '../../editor/contrib/links/browser/links.js';
|
|
38
|
-
import '../../editor/contrib/longLinesHelper/browser/longLinesHelper.js';
|
|
39
|
-
import '../../editor/contrib/middleScroll/browser/middleScroll.contribution.js';
|
|
40
|
-
import '../../editor/contrib/multicursor/browser/multicursor.js';
|
|
41
|
-
import '../../editor/contrib/parameterHints/browser/parameterHints.js';
|
|
42
|
-
import '../../editor/contrib/placeholderText/browser/placeholderText.contribution.js';
|
|
43
|
-
import '../../editor/contrib/rename/browser/rename.js';
|
|
44
|
-
import '../../editor/contrib/sectionHeaders/browser/sectionHeaders.js';
|
|
45
|
-
import '../../editor/contrib/semanticTokens/browser/documentSemanticTokens.js';
|
|
46
|
-
import '../../editor/contrib/semanticTokens/browser/viewportSemanticTokens.js';
|
|
47
|
-
import '../../editor/contrib/smartSelect/browser/smartSelect.js';
|
|
48
|
-
import '../../editor/contrib/snippet/browser/snippetController2.js';
|
|
49
|
-
import '../../editor/contrib/stickyScroll/browser/stickyScrollContribution.js';
|
|
50
|
-
import '../../editor/contrib/suggest/browser/suggestController.js';
|
|
51
|
-
import '../../editor/contrib/suggest/browser/suggestInlineCompletions.js';
|
|
52
|
-
import '../../editor/contrib/tokenization/browser/tokenization.js';
|
|
53
|
-
import '../../editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js';
|
|
54
|
-
import '../../editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js';
|
|
55
|
-
import '../../editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js';
|
|
56
|
-
import '../../editor/contrib/wordHighlighter/browser/wordHighlighter.js';
|
|
57
|
-
import '../../editor/contrib/wordOperations/browser/wordOperations.js';
|
|
58
|
-
import '../../editor/contrib/wordPartOperations/browser/wordPartOperations.js';
|
|
59
|
-
import '../../editor/contrib/readOnlyMessage/browser/contribution.js';
|
|
60
|
-
import '../../editor/contrib/diffEditorBreadcrumbs/browser/contribution.js';
|
|
61
|
-
import '../../editor/contrib/floatingMenu/browser/floatingMenu.contribution.js';
|
|
62
|
-
import '../../editor/common/standaloneStrings.js';
|
|
63
|
-
import '../../base/browser/ui/codicons/codicon/codicon.css';
|
|
64
|
-
import '../../base/browser/ui/codicons/codicon/codicon-modifiers.css';
|
|
65
|
-
import '../../editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js';
|
|
66
|
-
import '../../editor/standalone/browser/inspectTokens/inspectTokens.js';
|
|
67
|
-
import '../../editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js';
|
|
68
|
-
import '../../editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js';
|
|
69
|
-
import '../../editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js';
|
|
70
|
-
import '../../editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js';
|
|
71
|
-
import '../../editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js';
|
|
72
|
-
import '../../editor/standalone/browser/toggleHighContrast/toggleHighContrast.js';
|
|
73
|
-
import { languages, Emitter } from '../../editor/editor.api2.js';
|
|
74
|
-
|
|
75
|
-
class LanguageServiceDefaultsImpl {
|
|
76
|
-
constructor(languageId, diagnosticsOptions, modeConfiguration) {
|
|
77
|
-
this._onDidChange = new Emitter();
|
|
78
|
-
this._languageId = languageId;
|
|
79
|
-
this.setDiagnosticsOptions(diagnosticsOptions);
|
|
80
|
-
this.setModeConfiguration(modeConfiguration);
|
|
81
|
-
}
|
|
82
|
-
get onDidChange() {
|
|
83
|
-
return this._onDidChange.event;
|
|
84
|
-
}
|
|
85
|
-
get languageId() {
|
|
86
|
-
return this._languageId;
|
|
87
|
-
}
|
|
88
|
-
get modeConfiguration() {
|
|
89
|
-
return this._modeConfiguration;
|
|
90
|
-
}
|
|
91
|
-
get diagnosticsOptions() {
|
|
92
|
-
return this._diagnosticsOptions;
|
|
93
|
-
}
|
|
94
|
-
setDiagnosticsOptions(options) {
|
|
95
|
-
this._diagnosticsOptions = options || /* @__PURE__ */ Object.create(null);
|
|
96
|
-
this._onDidChange.fire(this);
|
|
97
|
-
}
|
|
98
|
-
setModeConfiguration(modeConfiguration) {
|
|
99
|
-
this._modeConfiguration = modeConfiguration || /* @__PURE__ */ Object.create(null);
|
|
100
|
-
this._onDidChange.fire(this);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
const diagnosticDefault = {
|
|
104
|
-
validate: true,
|
|
105
|
-
allowComments: true,
|
|
106
|
-
schemas: [],
|
|
107
|
-
enableSchemaRequest: false,
|
|
108
|
-
schemaRequest: "warning",
|
|
109
|
-
schemaValidation: "warning",
|
|
110
|
-
comments: "error",
|
|
111
|
-
trailingCommas: "error"
|
|
112
|
-
};
|
|
113
|
-
const modeConfigurationDefault = {
|
|
114
|
-
documentFormattingEdits: true,
|
|
115
|
-
documentRangeFormattingEdits: true,
|
|
116
|
-
completionItems: true,
|
|
117
|
-
hovers: true,
|
|
118
|
-
documentSymbols: true,
|
|
119
|
-
tokens: true,
|
|
120
|
-
colors: true,
|
|
121
|
-
foldingRanges: true,
|
|
122
|
-
diagnostics: true,
|
|
123
|
-
selectionRanges: true
|
|
124
|
-
};
|
|
125
|
-
const jsonDefaults = new LanguageServiceDefaultsImpl(
|
|
126
|
-
"json",
|
|
127
|
-
diagnosticDefault,
|
|
128
|
-
modeConfigurationDefault
|
|
129
|
-
);
|
|
130
|
-
const getWorker = () => getMode().then((mode2) => mode2.getWorker());
|
|
131
|
-
function getMode() {
|
|
132
|
-
return import('./jsonMode.js');
|
|
133
|
-
}
|
|
134
|
-
languages.register({
|
|
135
|
-
id: "json",
|
|
136
|
-
extensions: [".json", ".bowerrc", ".jshintrc", ".jscsrc", ".eslintrc", ".babelrc", ".har"],
|
|
137
|
-
aliases: ["JSON", "json"],
|
|
138
|
-
mimetypes: ["application/json"]
|
|
139
|
-
});
|
|
140
|
-
languages.onLanguage("json", () => {
|
|
141
|
-
getMode().then((mode2) => mode2.setupMode(jsonDefaults));
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
export { getWorker, jsonDefaults };
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { createScanner } from '../../../external/jsonc-parser/lib/esm/main.js';
|
|
2
|
-
|
|
3
|
-
function createTokenizationSupport(supportComments) {
|
|
4
|
-
return {
|
|
5
|
-
getInitialState: () => new JSONState(null, null, false, null),
|
|
6
|
-
tokenize: (line, state) => tokenize(supportComments, line, state)
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
const TOKEN_DELIM_OBJECT = "delimiter.bracket.json";
|
|
10
|
-
const TOKEN_DELIM_ARRAY = "delimiter.array.json";
|
|
11
|
-
const TOKEN_DELIM_COLON = "delimiter.colon.json";
|
|
12
|
-
const TOKEN_DELIM_COMMA = "delimiter.comma.json";
|
|
13
|
-
const TOKEN_VALUE_BOOLEAN = "keyword.json";
|
|
14
|
-
const TOKEN_VALUE_NULL = "keyword.json";
|
|
15
|
-
const TOKEN_VALUE_STRING = "string.value.json";
|
|
16
|
-
const TOKEN_VALUE_NUMBER = "number.json";
|
|
17
|
-
const TOKEN_PROPERTY_NAME = "string.key.json";
|
|
18
|
-
const TOKEN_COMMENT_BLOCK = "comment.block.json";
|
|
19
|
-
const TOKEN_COMMENT_LINE = "comment.line.json";
|
|
20
|
-
class ParentsStack {
|
|
21
|
-
constructor(parent, type) {
|
|
22
|
-
this.parent = parent;
|
|
23
|
-
this.type = type;
|
|
24
|
-
}
|
|
25
|
-
static pop(parents) {
|
|
26
|
-
if (parents) {
|
|
27
|
-
return parents.parent;
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
static push(parents, type) {
|
|
32
|
-
return new ParentsStack(parents, type);
|
|
33
|
-
}
|
|
34
|
-
static equals(a, b) {
|
|
35
|
-
if (!a && !b) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
if (!a || !b) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
while (a && b) {
|
|
42
|
-
if (a === b) {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
if (a.type !== b.type) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
a = a.parent;
|
|
49
|
-
b = b.parent;
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
class JSONState {
|
|
55
|
-
constructor(state, scanError, lastWasColon, parents) {
|
|
56
|
-
this._state = state;
|
|
57
|
-
this.scanError = scanError;
|
|
58
|
-
this.lastWasColon = lastWasColon;
|
|
59
|
-
this.parents = parents;
|
|
60
|
-
}
|
|
61
|
-
clone() {
|
|
62
|
-
return new JSONState(this._state, this.scanError, this.lastWasColon, this.parents);
|
|
63
|
-
}
|
|
64
|
-
equals(other) {
|
|
65
|
-
if (other === this) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
if (!other || !(other instanceof JSONState)) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
return this.scanError === other.scanError && this.lastWasColon === other.lastWasColon && ParentsStack.equals(this.parents, other.parents);
|
|
72
|
-
}
|
|
73
|
-
getStateData() {
|
|
74
|
-
return this._state;
|
|
75
|
-
}
|
|
76
|
-
setStateData(state) {
|
|
77
|
-
this._state = state;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function tokenize(comments, line, state, offsetDelta = 0) {
|
|
81
|
-
let numberOfInsertedCharacters = 0;
|
|
82
|
-
let adjustOffset = false;
|
|
83
|
-
switch (state.scanError) {
|
|
84
|
-
case 2 /* UnexpectedEndOfString */:
|
|
85
|
-
line = '"' + line;
|
|
86
|
-
numberOfInsertedCharacters = 1;
|
|
87
|
-
break;
|
|
88
|
-
case 1 /* UnexpectedEndOfComment */:
|
|
89
|
-
line = "/*" + line;
|
|
90
|
-
numberOfInsertedCharacters = 2;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
const scanner = createScanner(line);
|
|
94
|
-
let lastWasColon = state.lastWasColon;
|
|
95
|
-
let parents = state.parents;
|
|
96
|
-
const ret = {
|
|
97
|
-
tokens: [],
|
|
98
|
-
endState: state.clone()
|
|
99
|
-
};
|
|
100
|
-
while (true) {
|
|
101
|
-
let offset = offsetDelta + scanner.getPosition();
|
|
102
|
-
let type = "";
|
|
103
|
-
const kind = scanner.scan();
|
|
104
|
-
if (kind === 17 /* EOF */) {
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
if (offset === offsetDelta + scanner.getPosition()) {
|
|
108
|
-
throw new Error(
|
|
109
|
-
"Scanner did not advance, next 3 characters are: " + line.substr(scanner.getPosition(), 3)
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
if (adjustOffset) {
|
|
113
|
-
offset -= numberOfInsertedCharacters;
|
|
114
|
-
}
|
|
115
|
-
adjustOffset = numberOfInsertedCharacters > 0;
|
|
116
|
-
switch (kind) {
|
|
117
|
-
case 1 /* OpenBraceToken */:
|
|
118
|
-
parents = ParentsStack.push(parents, 0 /* Object */);
|
|
119
|
-
type = TOKEN_DELIM_OBJECT;
|
|
120
|
-
lastWasColon = false;
|
|
121
|
-
break;
|
|
122
|
-
case 2 /* CloseBraceToken */:
|
|
123
|
-
parents = ParentsStack.pop(parents);
|
|
124
|
-
type = TOKEN_DELIM_OBJECT;
|
|
125
|
-
lastWasColon = false;
|
|
126
|
-
break;
|
|
127
|
-
case 3 /* OpenBracketToken */:
|
|
128
|
-
parents = ParentsStack.push(parents, 1 /* Array */);
|
|
129
|
-
type = TOKEN_DELIM_ARRAY;
|
|
130
|
-
lastWasColon = false;
|
|
131
|
-
break;
|
|
132
|
-
case 4 /* CloseBracketToken */:
|
|
133
|
-
parents = ParentsStack.pop(parents);
|
|
134
|
-
type = TOKEN_DELIM_ARRAY;
|
|
135
|
-
lastWasColon = false;
|
|
136
|
-
break;
|
|
137
|
-
case 6 /* ColonToken */:
|
|
138
|
-
type = TOKEN_DELIM_COLON;
|
|
139
|
-
lastWasColon = true;
|
|
140
|
-
break;
|
|
141
|
-
case 5 /* CommaToken */:
|
|
142
|
-
type = TOKEN_DELIM_COMMA;
|
|
143
|
-
lastWasColon = false;
|
|
144
|
-
break;
|
|
145
|
-
case 8 /* TrueKeyword */:
|
|
146
|
-
case 9 /* FalseKeyword */:
|
|
147
|
-
type = TOKEN_VALUE_BOOLEAN;
|
|
148
|
-
lastWasColon = false;
|
|
149
|
-
break;
|
|
150
|
-
case 7 /* NullKeyword */:
|
|
151
|
-
type = TOKEN_VALUE_NULL;
|
|
152
|
-
lastWasColon = false;
|
|
153
|
-
break;
|
|
154
|
-
case 10 /* StringLiteral */:
|
|
155
|
-
const currentParent = parents ? parents.type : 0 /* Object */;
|
|
156
|
-
const inArray = currentParent === 1 /* Array */;
|
|
157
|
-
type = lastWasColon || inArray ? TOKEN_VALUE_STRING : TOKEN_PROPERTY_NAME;
|
|
158
|
-
lastWasColon = false;
|
|
159
|
-
break;
|
|
160
|
-
case 11 /* NumericLiteral */:
|
|
161
|
-
type = TOKEN_VALUE_NUMBER;
|
|
162
|
-
lastWasColon = false;
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
{
|
|
166
|
-
switch (kind) {
|
|
167
|
-
case 12 /* LineCommentTrivia */:
|
|
168
|
-
type = TOKEN_COMMENT_LINE;
|
|
169
|
-
break;
|
|
170
|
-
case 13 /* BlockCommentTrivia */:
|
|
171
|
-
type = TOKEN_COMMENT_BLOCK;
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
ret.endState = new JSONState(
|
|
176
|
-
state.getStateData(),
|
|
177
|
-
scanner.getTokenError(),
|
|
178
|
-
lastWasColon,
|
|
179
|
-
parents
|
|
180
|
-
);
|
|
181
|
-
ret.tokens.push({
|
|
182
|
-
startIndex: offset,
|
|
183
|
-
scopes: type
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
return ret;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export { TOKEN_COMMENT_BLOCK, TOKEN_COMMENT_LINE, TOKEN_DELIM_ARRAY, TOKEN_DELIM_COLON, TOKEN_DELIM_COMMA, TOKEN_DELIM_OBJECT, TOKEN_PROPERTY_NAME, TOKEN_VALUE_BOOLEAN, TOKEN_VALUE_NULL, TOKEN_VALUE_NUMBER, TOKEN_VALUE_STRING, createTokenizationSupport };
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { WorkerManager } from './workerManager.js';
|
|
2
|
-
import { SuggestAdapter, SignatureHelpAdapter, QuickInfoAdapter, DocumentHighlightAdapter, DefinitionAdapter, LibFiles, ReferenceAdapter, OutlineAdapter, RenameAdapter, FormatAdapter, FormatOnTypeAdapter, CodeActionAdaptor, InlayHintsAdapter, DiagnosticsAdapter } from './languageFeatures.js';
|
|
3
|
-
export { Adapter, FormatHelper, Kind, flattenDiagnosticMessageText } from './languageFeatures.js';
|
|
4
|
-
import '../../editor/browser/coreCommands.js';
|
|
5
|
-
import '../../editor/browser/widget/codeEditor/codeEditorWidget.js';
|
|
6
|
-
import '../../editor/browser/widget/diffEditor/diffEditor.contribution.js';
|
|
7
|
-
import '../../editor/contrib/anchorSelect/browser/anchorSelect.js';
|
|
8
|
-
import '../../editor/contrib/bracketMatching/browser/bracketMatching.js';
|
|
9
|
-
import '../../editor/contrib/caretOperations/browser/caretOperations.js';
|
|
10
|
-
import '../../editor/contrib/caretOperations/browser/transpose.js';
|
|
11
|
-
import '../../editor/contrib/clipboard/browser/clipboard.js';
|
|
12
|
-
import '../../editor/contrib/codeAction/browser/codeActionContributions.js';
|
|
13
|
-
import '../../editor/contrib/codelens/browser/codelensController.js';
|
|
14
|
-
import '../../editor/contrib/colorPicker/browser/colorPickerContribution.js';
|
|
15
|
-
import '../../editor/contrib/comment/browser/comment.js';
|
|
16
|
-
import '../../editor/contrib/contextmenu/browser/contextmenu.js';
|
|
17
|
-
import '../../editor/contrib/cursorUndo/browser/cursorUndo.js';
|
|
18
|
-
import '../../editor/contrib/dnd/browser/dnd.js';
|
|
19
|
-
import '../../editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js';
|
|
20
|
-
import '../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js';
|
|
21
|
-
import '../../editor/contrib/find/browser/findController.js';
|
|
22
|
-
import '../../editor/contrib/folding/browser/folding.js';
|
|
23
|
-
import '../../editor/contrib/fontZoom/browser/fontZoom.js';
|
|
24
|
-
import '../../editor/contrib/format/browser/formatActions.js';
|
|
25
|
-
import '../../editor/contrib/documentSymbols/browser/documentSymbols.js';
|
|
26
|
-
import '../../editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js';
|
|
27
|
-
import '../../editor/contrib/inlineProgress/browser/inlineProgress.js';
|
|
28
|
-
import '../../editor/contrib/gotoSymbol/browser/goToCommands.js';
|
|
29
|
-
import '../../editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js';
|
|
30
|
-
import '../../editor/contrib/gotoError/browser/gotoError.js';
|
|
31
|
-
import '../../editor/contrib/gpu/browser/gpuActions.js';
|
|
32
|
-
import '../../editor/contrib/hover/browser/hoverContribution.js';
|
|
33
|
-
import '../../editor/contrib/indentation/browser/indentation.js';
|
|
34
|
-
import '../../editor/contrib/inlayHints/browser/inlayHintsContribution.js';
|
|
35
|
-
import '../../editor/contrib/inPlaceReplace/browser/inPlaceReplace.js';
|
|
36
|
-
import '../../editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js';
|
|
37
|
-
import '../../editor/contrib/lineSelection/browser/lineSelection.js';
|
|
38
|
-
import '../../editor/contrib/linesOperations/browser/linesOperations.js';
|
|
39
|
-
import '../../editor/contrib/linkedEditing/browser/linkedEditing.js';
|
|
40
|
-
import '../../editor/contrib/links/browser/links.js';
|
|
41
|
-
import '../../editor/contrib/longLinesHelper/browser/longLinesHelper.js';
|
|
42
|
-
import '../../editor/contrib/middleScroll/browser/middleScroll.contribution.js';
|
|
43
|
-
import '../../editor/contrib/multicursor/browser/multicursor.js';
|
|
44
|
-
import '../../editor/contrib/parameterHints/browser/parameterHints.js';
|
|
45
|
-
import '../../editor/contrib/placeholderText/browser/placeholderText.contribution.js';
|
|
46
|
-
import '../../editor/contrib/rename/browser/rename.js';
|
|
47
|
-
import '../../editor/contrib/sectionHeaders/browser/sectionHeaders.js';
|
|
48
|
-
import '../../editor/contrib/semanticTokens/browser/documentSemanticTokens.js';
|
|
49
|
-
import '../../editor/contrib/semanticTokens/browser/viewportSemanticTokens.js';
|
|
50
|
-
import '../../editor/contrib/smartSelect/browser/smartSelect.js';
|
|
51
|
-
import '../../editor/contrib/snippet/browser/snippetController2.js';
|
|
52
|
-
import '../../editor/contrib/stickyScroll/browser/stickyScrollContribution.js';
|
|
53
|
-
import '../../editor/contrib/suggest/browser/suggestController.js';
|
|
54
|
-
import '../../editor/contrib/suggest/browser/suggestInlineCompletions.js';
|
|
55
|
-
import '../../editor/contrib/tokenization/browser/tokenization.js';
|
|
56
|
-
import '../../editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js';
|
|
57
|
-
import '../../editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js';
|
|
58
|
-
import '../../editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js';
|
|
59
|
-
import '../../editor/contrib/wordHighlighter/browser/wordHighlighter.js';
|
|
60
|
-
import '../../editor/contrib/wordOperations/browser/wordOperations.js';
|
|
61
|
-
import '../../editor/contrib/wordPartOperations/browser/wordPartOperations.js';
|
|
62
|
-
import '../../editor/contrib/readOnlyMessage/browser/contribution.js';
|
|
63
|
-
import '../../editor/contrib/diffEditorBreadcrumbs/browser/contribution.js';
|
|
64
|
-
import '../../editor/contrib/floatingMenu/browser/floatingMenu.contribution.js';
|
|
65
|
-
import '../../editor/common/standaloneStrings.js';
|
|
66
|
-
import '../../base/browser/ui/codicons/codicon/codicon.css';
|
|
67
|
-
import '../../base/browser/ui/codicons/codicon/codicon-modifiers.css';
|
|
68
|
-
import '../../editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js';
|
|
69
|
-
import '../../editor/standalone/browser/inspectTokens/inspectTokens.js';
|
|
70
|
-
import '../../editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js';
|
|
71
|
-
import '../../editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js';
|
|
72
|
-
import '../../editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess.js';
|
|
73
|
-
import '../../editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess.js';
|
|
74
|
-
import '../../editor/standalone/browser/referenceSearch/standaloneReferenceSearch.js';
|
|
75
|
-
import '../../editor/standalone/browser/toggleHighContrast/toggleHighContrast.js';
|
|
76
|
-
import { languages } from '../../editor/editor.api2.js';
|
|
77
|
-
|
|
78
|
-
let javaScriptWorker;
|
|
79
|
-
let typeScriptWorker;
|
|
80
|
-
function setupTypeScript(defaults) {
|
|
81
|
-
typeScriptWorker = setupMode(defaults, "typescript");
|
|
82
|
-
}
|
|
83
|
-
function setupJavaScript(defaults) {
|
|
84
|
-
javaScriptWorker = setupMode(defaults, "javascript");
|
|
85
|
-
}
|
|
86
|
-
function getJavaScriptWorker() {
|
|
87
|
-
return new Promise((resolve, reject) => {
|
|
88
|
-
if (!javaScriptWorker) {
|
|
89
|
-
return reject("JavaScript not registered!");
|
|
90
|
-
}
|
|
91
|
-
resolve(javaScriptWorker);
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function getTypeScriptWorker() {
|
|
95
|
-
return new Promise((resolve, reject) => {
|
|
96
|
-
if (!typeScriptWorker) {
|
|
97
|
-
return reject("TypeScript not registered!");
|
|
98
|
-
}
|
|
99
|
-
resolve(typeScriptWorker);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function setupMode(defaults, modeId) {
|
|
103
|
-
const providers = [];
|
|
104
|
-
const client = new WorkerManager(modeId, defaults);
|
|
105
|
-
const worker = (...uris) => {
|
|
106
|
-
return client.getLanguageServiceWorker(...uris);
|
|
107
|
-
};
|
|
108
|
-
const libFiles = new LibFiles(worker);
|
|
109
|
-
function registerProviders() {
|
|
110
|
-
const { modeConfiguration } = defaults;
|
|
111
|
-
disposeAll(providers);
|
|
112
|
-
if (modeConfiguration.completionItems) {
|
|
113
|
-
providers.push(
|
|
114
|
-
languages.registerCompletionItemProvider(
|
|
115
|
-
modeId,
|
|
116
|
-
new SuggestAdapter(worker)
|
|
117
|
-
)
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
if (modeConfiguration.signatureHelp) {
|
|
121
|
-
providers.push(
|
|
122
|
-
languages.registerSignatureHelpProvider(
|
|
123
|
-
modeId,
|
|
124
|
-
new SignatureHelpAdapter(worker)
|
|
125
|
-
)
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
if (modeConfiguration.hovers) {
|
|
129
|
-
providers.push(
|
|
130
|
-
languages.registerHoverProvider(modeId, new QuickInfoAdapter(worker))
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
if (modeConfiguration.documentHighlights) {
|
|
134
|
-
providers.push(
|
|
135
|
-
languages.registerDocumentHighlightProvider(
|
|
136
|
-
modeId,
|
|
137
|
-
new DocumentHighlightAdapter(worker)
|
|
138
|
-
)
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
if (modeConfiguration.definitions) {
|
|
142
|
-
providers.push(
|
|
143
|
-
languages.registerDefinitionProvider(
|
|
144
|
-
modeId,
|
|
145
|
-
new DefinitionAdapter(libFiles, worker)
|
|
146
|
-
)
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
if (modeConfiguration.references) {
|
|
150
|
-
providers.push(
|
|
151
|
-
languages.registerReferenceProvider(
|
|
152
|
-
modeId,
|
|
153
|
-
new ReferenceAdapter(libFiles, worker)
|
|
154
|
-
)
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
if (modeConfiguration.documentSymbols) {
|
|
158
|
-
providers.push(
|
|
159
|
-
languages.registerDocumentSymbolProvider(
|
|
160
|
-
modeId,
|
|
161
|
-
new OutlineAdapter(worker)
|
|
162
|
-
)
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
if (modeConfiguration.rename) {
|
|
166
|
-
providers.push(
|
|
167
|
-
languages.registerRenameProvider(
|
|
168
|
-
modeId,
|
|
169
|
-
new RenameAdapter(libFiles, worker)
|
|
170
|
-
)
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
if (modeConfiguration.documentRangeFormattingEdits) {
|
|
174
|
-
providers.push(
|
|
175
|
-
languages.registerDocumentRangeFormattingEditProvider(
|
|
176
|
-
modeId,
|
|
177
|
-
new FormatAdapter(worker)
|
|
178
|
-
)
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
if (modeConfiguration.onTypeFormattingEdits) {
|
|
182
|
-
providers.push(
|
|
183
|
-
languages.registerOnTypeFormattingEditProvider(
|
|
184
|
-
modeId,
|
|
185
|
-
new FormatOnTypeAdapter(worker)
|
|
186
|
-
)
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
if (modeConfiguration.codeActions) {
|
|
190
|
-
providers.push(
|
|
191
|
-
languages.registerCodeActionProvider(modeId, new CodeActionAdaptor(worker))
|
|
192
|
-
);
|
|
193
|
-
}
|
|
194
|
-
if (modeConfiguration.inlayHints) {
|
|
195
|
-
providers.push(
|
|
196
|
-
languages.registerInlayHintsProvider(modeId, new InlayHintsAdapter(worker))
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
if (modeConfiguration.diagnostics) {
|
|
200
|
-
providers.push(new DiagnosticsAdapter(libFiles, defaults, modeId, worker));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
registerProviders();
|
|
204
|
-
return worker;
|
|
205
|
-
}
|
|
206
|
-
function disposeAll(disposables) {
|
|
207
|
-
while (disposables.length) {
|
|
208
|
-
disposables.pop().dispose();
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export { CodeActionAdaptor, DefinitionAdapter, DiagnosticsAdapter, DocumentHighlightAdapter, FormatAdapter, FormatOnTypeAdapter, InlayHintsAdapter, LibFiles, OutlineAdapter, QuickInfoAdapter, ReferenceAdapter, RenameAdapter, SignatureHelpAdapter, SuggestAdapter, WorkerManager, getJavaScriptWorker, getTypeScriptWorker, setupJavaScript, setupTypeScript };
|