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,102 @@
|
|
|
1
|
+
import { localize } from '../../../nls.js';
|
|
2
|
+
import { Color, RGBA } from '../../../base/common/color.js';
|
|
3
|
+
import { registerColor } from '../../../platform/theme/common/colorUtils.js';
|
|
4
|
+
import { contrastBorder, activeContrastBorder } from '../../../platform/theme/common/colors/baseColors.js';
|
|
5
|
+
import '../../../platform/theme/common/colors/chartsColors.js';
|
|
6
|
+
import { editorFindMatchHighlight, editorBackground, editorWarningBorder, editorWarningForeground, editorInfoBorder, editorInfoForeground, editorWarningBackground } from '../../../platform/theme/common/colors/editorColors.js';
|
|
7
|
+
import '../../../platform/theme/common/colors/inputColors.js';
|
|
8
|
+
import '../../../platform/theme/common/colors/listColors.js';
|
|
9
|
+
import '../../../platform/theme/common/colors/menuColors.js';
|
|
10
|
+
import '../../../platform/theme/common/colors/minimapColors.js';
|
|
11
|
+
import '../../../platform/theme/common/colors/miscColors.js';
|
|
12
|
+
import '../../../platform/theme/common/colors/quickpickColors.js';
|
|
13
|
+
import '../../../platform/theme/common/colors/searchColors.js';
|
|
14
|
+
import { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';
|
|
15
|
+
|
|
16
|
+
/*---------------------------------------------------------------------------------------------
|
|
17
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
19
|
+
*--------------------------------------------------------------------------------------------*/
|
|
20
|
+
/**
|
|
21
|
+
* Definition of the editor colors
|
|
22
|
+
*/
|
|
23
|
+
const editorLineHighlight = registerColor('editor.lineHighlightBackground', null, localize(610, 'Background color for the highlight of line at the cursor position.'));
|
|
24
|
+
const editorLineHighlightBorder = registerColor('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hcDark: '#f38518', hcLight: contrastBorder }, localize(611, 'Background color for the border around the line at the cursor position.'));
|
|
25
|
+
registerColor('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hcDark: null, hcLight: null }, localize(612, 'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.'), true);
|
|
26
|
+
registerColor('editor.rangeHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, localize(613, 'Background color of the border around highlighted ranges.'));
|
|
27
|
+
registerColor('editor.symbolHighlightBackground', { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hcDark: null, hcLight: null }, localize(614, 'Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.'), true);
|
|
28
|
+
registerColor('editor.symbolHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, localize(615, 'Background color of the border around highlighted symbols.'));
|
|
29
|
+
const editorCursorForeground = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hcDark: Color.white, hcLight: '#0F4A85' }, localize(616, 'Color of the editor cursor.'));
|
|
30
|
+
const editorCursorBackground = registerColor('editorCursor.background', null, localize(617, 'The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.'));
|
|
31
|
+
const editorMultiCursorPrimaryForeground = registerColor('editorMultiCursor.primary.foreground', editorCursorForeground, localize(618, 'Color of the primary editor cursor when multiple cursors are present.'));
|
|
32
|
+
const editorMultiCursorPrimaryBackground = registerColor('editorMultiCursor.primary.background', editorCursorBackground, localize(619, 'The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
|
|
33
|
+
const editorMultiCursorSecondaryForeground = registerColor('editorMultiCursor.secondary.foreground', editorCursorForeground, localize(620, 'Color of secondary editor cursors when multiple cursors are present.'));
|
|
34
|
+
const editorMultiCursorSecondaryBackground = registerColor('editorMultiCursor.secondary.background', editorCursorBackground, localize(621, 'The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
|
|
35
|
+
const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hcDark: '#e3e4e229', hcLight: '#CCCCCC' }, localize(622, 'Color of whitespace characters in the editor.'));
|
|
36
|
+
const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#858585', light: '#237893', hcDark: Color.white, hcLight: '#292929' }, localize(623, 'Color of editor line numbers.'));
|
|
37
|
+
const deprecatedEditorIndentGuides = registerColor('editorIndentGuide.background', editorWhitespaces, localize(624, 'Color of the editor indentation guides.'), false, localize(625, '\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.'));
|
|
38
|
+
const deprecatedEditorActiveIndentGuides = registerColor('editorIndentGuide.activeBackground', editorWhitespaces, localize(626, 'Color of the active editor indentation guides.'), false, localize(627, '\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.'));
|
|
39
|
+
const editorIndentGuide1 = registerColor('editorIndentGuide.background1', deprecatedEditorIndentGuides, localize(628, 'Color of the editor indentation guides (1).'));
|
|
40
|
+
const editorIndentGuide2 = registerColor('editorIndentGuide.background2', '#00000000', localize(629, 'Color of the editor indentation guides (2).'));
|
|
41
|
+
const editorIndentGuide3 = registerColor('editorIndentGuide.background3', '#00000000', localize(630, 'Color of the editor indentation guides (3).'));
|
|
42
|
+
const editorIndentGuide4 = registerColor('editorIndentGuide.background4', '#00000000', localize(631, 'Color of the editor indentation guides (4).'));
|
|
43
|
+
const editorIndentGuide5 = registerColor('editorIndentGuide.background5', '#00000000', localize(632, 'Color of the editor indentation guides (5).'));
|
|
44
|
+
const editorIndentGuide6 = registerColor('editorIndentGuide.background6', '#00000000', localize(633, 'Color of the editor indentation guides (6).'));
|
|
45
|
+
const editorActiveIndentGuide1 = registerColor('editorIndentGuide.activeBackground1', deprecatedEditorActiveIndentGuides, localize(634, 'Color of the active editor indentation guides (1).'));
|
|
46
|
+
const editorActiveIndentGuide2 = registerColor('editorIndentGuide.activeBackground2', '#00000000', localize(635, 'Color of the active editor indentation guides (2).'));
|
|
47
|
+
const editorActiveIndentGuide3 = registerColor('editorIndentGuide.activeBackground3', '#00000000', localize(636, 'Color of the active editor indentation guides (3).'));
|
|
48
|
+
const editorActiveIndentGuide4 = registerColor('editorIndentGuide.activeBackground4', '#00000000', localize(637, 'Color of the active editor indentation guides (4).'));
|
|
49
|
+
const editorActiveIndentGuide5 = registerColor('editorIndentGuide.activeBackground5', '#00000000', localize(638, 'Color of the active editor indentation guides (5).'));
|
|
50
|
+
const editorActiveIndentGuide6 = registerColor('editorIndentGuide.activeBackground6', '#00000000', localize(639, 'Color of the active editor indentation guides (6).'));
|
|
51
|
+
const deprecatedEditorActiveLineNumber = registerColor('editorActiveLineNumber.foreground', { dark: '#c6c6c6', light: '#0B216F', hcDark: activeContrastBorder, hcLight: activeContrastBorder }, localize(640, 'Color of editor active line number'), false, localize(641, 'Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.'));
|
|
52
|
+
registerColor('editorLineNumber.activeForeground', deprecatedEditorActiveLineNumber, localize(642, 'Color of editor active line number'));
|
|
53
|
+
const editorDimmedLineNumber = registerColor('editorLineNumber.dimmedForeground', null, localize(643, 'Color of the final editor line when editor.renderFinalNewline is set to dimmed.'));
|
|
54
|
+
const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hcDark: Color.white, hcLight: '#292929' }, localize(644, 'Color of the editor rulers.'));
|
|
55
|
+
registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#919191', hcDark: '#999999', hcLight: '#292929' }, localize(645, 'Foreground color of editor CodeLens'));
|
|
56
|
+
registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hcDark: '#0064001a', hcLight: '#0000' }, localize(646, 'Background color behind matching brackets'));
|
|
57
|
+
registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hcDark: contrastBorder, hcLight: contrastBorder }, localize(647, 'Color for matching brackets boxes'));
|
|
58
|
+
const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hcDark: '#7f7f7f4d', hcLight: '#666666' }, localize(648, 'Color of the overview ruler border.'));
|
|
59
|
+
const editorOverviewRulerBackground = registerColor('editorOverviewRuler.background', null, localize(649, 'Background color of the editor overview ruler.'));
|
|
60
|
+
registerColor('editorGutter.background', editorBackground, localize(650, 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'));
|
|
61
|
+
registerColor('editorUnnecessaryCode.border', { dark: null, light: null, hcDark: Color.fromHex('#fff').transparent(0.8), hcLight: contrastBorder }, localize(651, 'Border color of unnecessary (unused) source code in the editor.'));
|
|
62
|
+
const editorUnnecessaryCodeOpacity = registerColor('editorUnnecessaryCode.opacity', { dark: Color.fromHex('#000a'), light: Color.fromHex('#0007'), hcDark: null, hcLight: null }, localize(652, 'Opacity of unnecessary (unused) source code in the editor. For example, "#000000c0" will render the code with 75% opacity. For high contrast themes, use the \'editorUnnecessaryCode.border\' theme color to underline unnecessary code instead of fading it out.'));
|
|
63
|
+
registerColor('editorGhostText.border', { dark: null, light: null, hcDark: Color.fromHex('#fff').transparent(0.8), hcLight: Color.fromHex('#292929').transparent(0.8) }, localize(653, 'Border color of ghost text in the editor.'));
|
|
64
|
+
const ghostTextForeground = registerColor('editorGhostText.foreground', { dark: Color.fromHex('#ffffff56'), light: Color.fromHex('#0007'), hcDark: null, hcLight: null }, localize(654, 'Foreground color of the ghost text in the editor.'));
|
|
65
|
+
registerColor('editorGhostText.background', null, localize(655, 'Background color of the ghost text in the editor.'));
|
|
66
|
+
const rulerRangeDefault = new Color(new RGBA(0, 122, 204, 0.6));
|
|
67
|
+
const overviewRulerRangeHighlight = registerColor('editorOverviewRuler.rangeHighlightForeground', rulerRangeDefault, localize(656, 'Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.'), true);
|
|
68
|
+
const overviewRulerError = registerColor('editorOverviewRuler.errorForeground', { dark: new Color(new RGBA(255, 18, 18, 0.7)), light: new Color(new RGBA(255, 18, 18, 0.7)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, localize(657, 'Overview ruler marker color for errors.'));
|
|
69
|
+
const overviewRulerWarning = registerColor('editorOverviewRuler.warningForeground', { dark: editorWarningForeground, light: editorWarningForeground, hcDark: editorWarningBorder, hcLight: editorWarningBorder }, localize(658, 'Overview ruler marker color for warnings.'));
|
|
70
|
+
const overviewRulerInfo = registerColor('editorOverviewRuler.infoForeground', { dark: editorInfoForeground, light: editorInfoForeground, hcDark: editorInfoBorder, hcLight: editorInfoBorder }, localize(659, 'Overview ruler marker color for infos.'));
|
|
71
|
+
const editorBracketHighlightingForeground1 = registerColor('editorBracketHighlight.foreground1', { dark: '#FFD700', light: '#0431FAFF', hcDark: '#FFD700', hcLight: '#0431FAFF' }, localize(660, 'Foreground color of brackets (1). Requires enabling bracket pair colorization.'));
|
|
72
|
+
const editorBracketHighlightingForeground2 = registerColor('editorBracketHighlight.foreground2', { dark: '#DA70D6', light: '#319331FF', hcDark: '#DA70D6', hcLight: '#319331FF' }, localize(661, 'Foreground color of brackets (2). Requires enabling bracket pair colorization.'));
|
|
73
|
+
const editorBracketHighlightingForeground3 = registerColor('editorBracketHighlight.foreground3', { dark: '#179FFF', light: '#7B3814FF', hcDark: '#87CEFA', hcLight: '#7B3814FF' }, localize(662, 'Foreground color of brackets (3). Requires enabling bracket pair colorization.'));
|
|
74
|
+
const editorBracketHighlightingForeground4 = registerColor('editorBracketHighlight.foreground4', '#00000000', localize(663, 'Foreground color of brackets (4). Requires enabling bracket pair colorization.'));
|
|
75
|
+
const editorBracketHighlightingForeground5 = registerColor('editorBracketHighlight.foreground5', '#00000000', localize(664, 'Foreground color of brackets (5). Requires enabling bracket pair colorization.'));
|
|
76
|
+
const editorBracketHighlightingForeground6 = registerColor('editorBracketHighlight.foreground6', '#00000000', localize(665, 'Foreground color of brackets (6). Requires enabling bracket pair colorization.'));
|
|
77
|
+
const editorBracketHighlightingUnexpectedBracketForeground = registerColor('editorBracketHighlight.unexpectedBracket.foreground', { dark: new Color(new RGBA(255, 18, 18, 0.8)), light: new Color(new RGBA(255, 18, 18, 0.8)), hcDark: new Color(new RGBA(255, 50, 50, 1)), hcLight: '#B5200D' }, localize(666, 'Foreground color of unexpected brackets.'));
|
|
78
|
+
const editorBracketPairGuideBackground1 = registerColor('editorBracketPairGuide.background1', '#00000000', localize(667, 'Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.'));
|
|
79
|
+
const editorBracketPairGuideBackground2 = registerColor('editorBracketPairGuide.background2', '#00000000', localize(668, 'Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.'));
|
|
80
|
+
const editorBracketPairGuideBackground3 = registerColor('editorBracketPairGuide.background3', '#00000000', localize(669, 'Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.'));
|
|
81
|
+
const editorBracketPairGuideBackground4 = registerColor('editorBracketPairGuide.background4', '#00000000', localize(670, 'Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.'));
|
|
82
|
+
const editorBracketPairGuideBackground5 = registerColor('editorBracketPairGuide.background5', '#00000000', localize(671, 'Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.'));
|
|
83
|
+
const editorBracketPairGuideBackground6 = registerColor('editorBracketPairGuide.background6', '#00000000', localize(672, 'Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.'));
|
|
84
|
+
const editorBracketPairGuideActiveBackground1 = registerColor('editorBracketPairGuide.activeBackground1', '#00000000', localize(673, 'Background color of active bracket pair guides (1). Requires enabling bracket pair guides.'));
|
|
85
|
+
const editorBracketPairGuideActiveBackground2 = registerColor('editorBracketPairGuide.activeBackground2', '#00000000', localize(674, 'Background color of active bracket pair guides (2). Requires enabling bracket pair guides.'));
|
|
86
|
+
const editorBracketPairGuideActiveBackground3 = registerColor('editorBracketPairGuide.activeBackground3', '#00000000', localize(675, 'Background color of active bracket pair guides (3). Requires enabling bracket pair guides.'));
|
|
87
|
+
const editorBracketPairGuideActiveBackground4 = registerColor('editorBracketPairGuide.activeBackground4', '#00000000', localize(676, 'Background color of active bracket pair guides (4). Requires enabling bracket pair guides.'));
|
|
88
|
+
const editorBracketPairGuideActiveBackground5 = registerColor('editorBracketPairGuide.activeBackground5', '#00000000', localize(677, 'Background color of active bracket pair guides (5). Requires enabling bracket pair guides.'));
|
|
89
|
+
const editorBracketPairGuideActiveBackground6 = registerColor('editorBracketPairGuide.activeBackground6', '#00000000', localize(678, 'Background color of active bracket pair guides (6). Requires enabling bracket pair guides.'));
|
|
90
|
+
registerColor('editorUnicodeHighlight.border', editorWarningForeground, localize(679, 'Border color used to highlight unicode characters.'));
|
|
91
|
+
registerColor('editorUnicodeHighlight.background', editorWarningBackground, localize(680, 'Background color used to highlight unicode characters.'));
|
|
92
|
+
// contains all color rules that used to defined in editor/browser/widget/editor.css
|
|
93
|
+
registerThemingParticipant((theme, collector) => {
|
|
94
|
+
const background = theme.getColor(editorBackground);
|
|
95
|
+
const lineHighlight = theme.getColor(editorLineHighlight);
|
|
96
|
+
const imeBackground = (lineHighlight && !lineHighlight.isTransparent() ? lineHighlight : background);
|
|
97
|
+
if (imeBackground) {
|
|
98
|
+
collector.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${imeBackground}; }`);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export { deprecatedEditorActiveIndentGuides, deprecatedEditorIndentGuides, editorActiveIndentGuide1, editorActiveIndentGuide2, editorActiveIndentGuide3, editorActiveIndentGuide4, editorActiveIndentGuide5, editorActiveIndentGuide6, editorBracketHighlightingForeground1, editorBracketHighlightingForeground2, editorBracketHighlightingForeground3, editorBracketHighlightingForeground4, editorBracketHighlightingForeground5, editorBracketHighlightingForeground6, editorBracketHighlightingUnexpectedBracketForeground, editorBracketPairGuideActiveBackground1, editorBracketPairGuideActiveBackground2, editorBracketPairGuideActiveBackground3, editorBracketPairGuideActiveBackground4, editorBracketPairGuideActiveBackground5, editorBracketPairGuideActiveBackground6, editorBracketPairGuideBackground1, editorBracketPairGuideBackground2, editorBracketPairGuideBackground3, editorBracketPairGuideBackground4, editorBracketPairGuideBackground5, editorBracketPairGuideBackground6, editorCursorBackground, editorCursorForeground, editorDimmedLineNumber, editorIndentGuide1, editorIndentGuide2, editorIndentGuide3, editorIndentGuide4, editorIndentGuide5, editorIndentGuide6, editorLineHighlight, editorLineHighlightBorder, editorLineNumbers, editorMultiCursorPrimaryBackground, editorMultiCursorPrimaryForeground, editorMultiCursorSecondaryBackground, editorMultiCursorSecondaryForeground, editorOverviewRulerBackground, editorOverviewRulerBorder, editorRuler, editorUnnecessaryCodeOpacity, editorWhitespaces, ghostTextForeground, overviewRulerError, overviewRulerInfo, overviewRulerRangeHighlight, overviewRulerWarning };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* The type of the `IEditor`.
|
|
7
|
+
*/
|
|
8
|
+
const EditorType = {
|
|
9
|
+
ICodeEditor: 'vs.editor.ICodeEditor',
|
|
10
|
+
IDiffEditor: 'vs.editor.IDiffEditor'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { EditorType };
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { diffEditorDefaultOptions } from './diffEditor.js';
|
|
2
|
+
import { editorOptionsRegistry } from './editorOptions.js';
|
|
3
|
+
import { EDITOR_MODEL_DEFAULTS } from '../core/misc/textModelDefaults.js';
|
|
4
|
+
import { localize } from '../../../nls.js';
|
|
5
|
+
import { Extensions } from '../../../platform/configuration/common/configurationRegistry.js';
|
|
6
|
+
import { Registry } from '../../../platform/registry/common/platform.js';
|
|
7
|
+
|
|
8
|
+
const editorConfigurationBaseNode = Object.freeze({
|
|
9
|
+
id: 'editor',
|
|
10
|
+
order: 5,
|
|
11
|
+
type: 'object',
|
|
12
|
+
title: localize(147, "Editor"),
|
|
13
|
+
scope: 6 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */,
|
|
14
|
+
});
|
|
15
|
+
const editorConfiguration = {
|
|
16
|
+
...editorConfigurationBaseNode,
|
|
17
|
+
properties: {
|
|
18
|
+
'editor.tabSize': {
|
|
19
|
+
type: 'number',
|
|
20
|
+
default: EDITOR_MODEL_DEFAULTS.tabSize,
|
|
21
|
+
minimum: 1,
|
|
22
|
+
maximum: 100,
|
|
23
|
+
markdownDescription: localize(148, "The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.", '`#editor.detectIndentation#`')
|
|
24
|
+
},
|
|
25
|
+
'editor.indentSize': {
|
|
26
|
+
'anyOf': [
|
|
27
|
+
{
|
|
28
|
+
type: 'string',
|
|
29
|
+
enum: ['tabSize']
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'number',
|
|
33
|
+
minimum: 1
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
default: 'tabSize',
|
|
37
|
+
markdownDescription: localize(149, "The number of spaces used for indentation or `\"tabSize\"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")
|
|
38
|
+
},
|
|
39
|
+
'editor.insertSpaces': {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
default: EDITOR_MODEL_DEFAULTS.insertSpaces,
|
|
42
|
+
markdownDescription: localize(150, "Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.", '`#editor.detectIndentation#`')
|
|
43
|
+
},
|
|
44
|
+
'editor.detectIndentation': {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
default: EDITOR_MODEL_DEFAULTS.detectIndentation,
|
|
47
|
+
markdownDescription: localize(151, "Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.", '`#editor.tabSize#`', '`#editor.insertSpaces#`')
|
|
48
|
+
},
|
|
49
|
+
'editor.trimAutoWhitespace': {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,
|
|
52
|
+
description: localize(152, "Remove trailing auto inserted whitespace.")
|
|
53
|
+
},
|
|
54
|
+
'editor.largeFileOptimizations': {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: EDITOR_MODEL_DEFAULTS.largeFileOptimizations,
|
|
57
|
+
description: localize(153, "Special handling for large files to disable certain memory intensive features.")
|
|
58
|
+
},
|
|
59
|
+
'editor.wordBasedSuggestions': {
|
|
60
|
+
enum: ['off', 'currentDocument', 'matchingDocuments', 'allDocuments'],
|
|
61
|
+
default: 'matchingDocuments',
|
|
62
|
+
enumDescriptions: [
|
|
63
|
+
localize(154, 'Turn off Word Based Suggestions.'),
|
|
64
|
+
localize(155, 'Only suggest words from the active document.'),
|
|
65
|
+
localize(156, 'Suggest words from all open documents of the same language.'),
|
|
66
|
+
localize(157, 'Suggest words from all open documents.')
|
|
67
|
+
],
|
|
68
|
+
description: localize(158, "Controls whether completions should be computed based on words in the document and from which documents they are computed.")
|
|
69
|
+
},
|
|
70
|
+
'editor.semanticHighlighting.enabled': {
|
|
71
|
+
enum: [true, false, 'configuredByTheme'],
|
|
72
|
+
enumDescriptions: [
|
|
73
|
+
localize(159, 'Semantic highlighting enabled for all color themes.'),
|
|
74
|
+
localize(160, 'Semantic highlighting disabled for all color themes.'),
|
|
75
|
+
localize(161, 'Semantic highlighting is configured by the current color theme\'s `semanticHighlighting` setting.')
|
|
76
|
+
],
|
|
77
|
+
default: 'configuredByTheme',
|
|
78
|
+
description: localize(162, "Controls whether the semanticHighlighting is shown for the languages that support it.")
|
|
79
|
+
},
|
|
80
|
+
'editor.stablePeek': {
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
default: false,
|
|
83
|
+
markdownDescription: localize(163, "Keep peek editors open even when double-clicking their content or when hitting `Escape`.")
|
|
84
|
+
},
|
|
85
|
+
'editor.maxTokenizationLineLength': {
|
|
86
|
+
type: 'integer',
|
|
87
|
+
default: 20_000,
|
|
88
|
+
description: localize(164, "Lines above this length will not be tokenized for performance reasons")
|
|
89
|
+
},
|
|
90
|
+
'editor.experimental.asyncTokenization': {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
default: true,
|
|
93
|
+
description: localize(165, "Controls whether the tokenization should happen asynchronously on a web worker."),
|
|
94
|
+
tags: ['experimental'],
|
|
95
|
+
},
|
|
96
|
+
'editor.experimental.asyncTokenizationLogging': {
|
|
97
|
+
type: 'boolean',
|
|
98
|
+
default: false,
|
|
99
|
+
description: localize(166, "Controls whether async tokenization should be logged. For debugging only."),
|
|
100
|
+
},
|
|
101
|
+
'editor.experimental.asyncTokenizationVerification': {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
default: false,
|
|
104
|
+
description: localize(167, "Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),
|
|
105
|
+
tags: ['experimental'],
|
|
106
|
+
},
|
|
107
|
+
'editor.experimental.treeSitterTelemetry': {
|
|
108
|
+
type: 'boolean',
|
|
109
|
+
default: false,
|
|
110
|
+
markdownDescription: localize(168, "Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `#editor.experimental.preferTreeSitter#` for specific languages will take precedence."),
|
|
111
|
+
tags: ['experimental'],
|
|
112
|
+
experiment: {
|
|
113
|
+
mode: 'auto'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
'editor.experimental.preferTreeSitter.css': {
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
default: false,
|
|
119
|
+
markdownDescription: localize(169, "Controls whether tree sitter parsing should be turned on for css. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for css."),
|
|
120
|
+
tags: ['experimental'],
|
|
121
|
+
experiment: {
|
|
122
|
+
mode: 'auto'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
'editor.experimental.preferTreeSitter.typescript': {
|
|
126
|
+
type: 'boolean',
|
|
127
|
+
default: false,
|
|
128
|
+
markdownDescription: localize(170, "Controls whether tree sitter parsing should be turned on for typescript. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for typescript."),
|
|
129
|
+
tags: ['experimental'],
|
|
130
|
+
experiment: {
|
|
131
|
+
mode: 'auto'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
'editor.experimental.preferTreeSitter.ini': {
|
|
135
|
+
type: 'boolean',
|
|
136
|
+
default: false,
|
|
137
|
+
markdownDescription: localize(171, "Controls whether tree sitter parsing should be turned on for ini. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for ini."),
|
|
138
|
+
tags: ['experimental'],
|
|
139
|
+
experiment: {
|
|
140
|
+
mode: 'auto'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
'editor.experimental.preferTreeSitter.regex': {
|
|
144
|
+
type: 'boolean',
|
|
145
|
+
default: false,
|
|
146
|
+
markdownDescription: localize(172, "Controls whether tree sitter parsing should be turned on for regex. This will take precedence over `#editor.experimental.treeSitterTelemetry#` for regex."),
|
|
147
|
+
tags: ['experimental'],
|
|
148
|
+
experiment: {
|
|
149
|
+
mode: 'auto'
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
'editor.language.brackets': {
|
|
153
|
+
type: ['array', 'null'],
|
|
154
|
+
default: null, // We want to distinguish the empty array from not configured.
|
|
155
|
+
description: localize(173, 'Defines the bracket symbols that increase or decrease the indentation.'),
|
|
156
|
+
items: {
|
|
157
|
+
type: 'array',
|
|
158
|
+
items: [
|
|
159
|
+
{
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: localize(174, 'The opening bracket character or string sequence.')
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: localize(175, 'The closing bracket character or string sequence.')
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
'editor.language.colorizedBracketPairs': {
|
|
171
|
+
type: ['array', 'null'],
|
|
172
|
+
default: null, // We want to distinguish the empty array from not configured.
|
|
173
|
+
description: localize(176, 'Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled.'),
|
|
174
|
+
items: {
|
|
175
|
+
type: 'array',
|
|
176
|
+
items: [
|
|
177
|
+
{
|
|
178
|
+
type: 'string',
|
|
179
|
+
description: localize(177, 'The opening bracket character or string sequence.')
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: localize(178, 'The closing bracket character or string sequence.')
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
'diffEditor.maxComputationTime': {
|
|
189
|
+
type: 'number',
|
|
190
|
+
default: diffEditorDefaultOptions.maxComputationTime,
|
|
191
|
+
description: localize(179, "Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")
|
|
192
|
+
},
|
|
193
|
+
'diffEditor.maxFileSize': {
|
|
194
|
+
type: 'number',
|
|
195
|
+
default: diffEditorDefaultOptions.maxFileSize,
|
|
196
|
+
description: localize(180, "Maximum file size in MB for which to compute diffs. Use 0 for no limit.")
|
|
197
|
+
},
|
|
198
|
+
'diffEditor.renderSideBySide': {
|
|
199
|
+
type: 'boolean',
|
|
200
|
+
default: diffEditorDefaultOptions.renderSideBySide,
|
|
201
|
+
description: localize(181, "Controls whether the diff editor shows the diff side by side or inline.")
|
|
202
|
+
},
|
|
203
|
+
'diffEditor.renderSideBySideInlineBreakpoint': {
|
|
204
|
+
type: 'number',
|
|
205
|
+
default: diffEditorDefaultOptions.renderSideBySideInlineBreakpoint,
|
|
206
|
+
description: localize(182, "If the diff editor width is smaller than this value, the inline view is used.")
|
|
207
|
+
},
|
|
208
|
+
'diffEditor.useInlineViewWhenSpaceIsLimited': {
|
|
209
|
+
type: 'boolean',
|
|
210
|
+
default: diffEditorDefaultOptions.useInlineViewWhenSpaceIsLimited,
|
|
211
|
+
description: localize(183, "If enabled and the editor width is too small, the inline view is used.")
|
|
212
|
+
},
|
|
213
|
+
'diffEditor.renderMarginRevertIcon': {
|
|
214
|
+
type: 'boolean',
|
|
215
|
+
default: diffEditorDefaultOptions.renderMarginRevertIcon,
|
|
216
|
+
description: localize(184, "When enabled, the diff editor shows arrows in its glyph margin to revert changes.")
|
|
217
|
+
},
|
|
218
|
+
'diffEditor.renderGutterMenu': {
|
|
219
|
+
type: 'boolean',
|
|
220
|
+
default: diffEditorDefaultOptions.renderGutterMenu,
|
|
221
|
+
description: localize(185, "When enabled, the diff editor shows a special gutter for revert and stage actions.")
|
|
222
|
+
},
|
|
223
|
+
'diffEditor.ignoreTrimWhitespace': {
|
|
224
|
+
type: 'boolean',
|
|
225
|
+
default: diffEditorDefaultOptions.ignoreTrimWhitespace,
|
|
226
|
+
description: localize(186, "When enabled, the diff editor ignores changes in leading or trailing whitespace.")
|
|
227
|
+
},
|
|
228
|
+
'diffEditor.renderIndicators': {
|
|
229
|
+
type: 'boolean',
|
|
230
|
+
default: diffEditorDefaultOptions.renderIndicators,
|
|
231
|
+
description: localize(187, "Controls whether the diff editor shows +/- indicators for added/removed changes.")
|
|
232
|
+
},
|
|
233
|
+
'diffEditor.codeLens': {
|
|
234
|
+
type: 'boolean',
|
|
235
|
+
default: diffEditorDefaultOptions.diffCodeLens,
|
|
236
|
+
description: localize(188, "Controls whether the editor shows CodeLens.")
|
|
237
|
+
},
|
|
238
|
+
'diffEditor.wordWrap': {
|
|
239
|
+
type: 'string',
|
|
240
|
+
enum: ['off', 'on', 'inherit'],
|
|
241
|
+
default: diffEditorDefaultOptions.diffWordWrap,
|
|
242
|
+
markdownEnumDescriptions: [
|
|
243
|
+
localize(189, "Lines will never wrap."),
|
|
244
|
+
localize(190, "Lines will wrap at the viewport width."),
|
|
245
|
+
localize(191, "Lines will wrap according to the {0} setting.", '`#editor.wordWrap#`'),
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
'diffEditor.diffAlgorithm': {
|
|
249
|
+
type: 'string',
|
|
250
|
+
enum: ['legacy', 'advanced'],
|
|
251
|
+
default: diffEditorDefaultOptions.diffAlgorithm,
|
|
252
|
+
markdownEnumDescriptions: [
|
|
253
|
+
localize(192, "Uses the legacy diffing algorithm."),
|
|
254
|
+
localize(193, "Uses the advanced diffing algorithm."),
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
'diffEditor.hideUnchangedRegions.enabled': {
|
|
258
|
+
type: 'boolean',
|
|
259
|
+
default: diffEditorDefaultOptions.hideUnchangedRegions.enabled,
|
|
260
|
+
markdownDescription: localize(194, "Controls whether the diff editor shows unchanged regions."),
|
|
261
|
+
},
|
|
262
|
+
'diffEditor.hideUnchangedRegions.revealLineCount': {
|
|
263
|
+
type: 'integer',
|
|
264
|
+
default: diffEditorDefaultOptions.hideUnchangedRegions.revealLineCount,
|
|
265
|
+
markdownDescription: localize(195, "Controls how many lines are used for unchanged regions."),
|
|
266
|
+
minimum: 1,
|
|
267
|
+
},
|
|
268
|
+
'diffEditor.hideUnchangedRegions.minimumLineCount': {
|
|
269
|
+
type: 'integer',
|
|
270
|
+
default: diffEditorDefaultOptions.hideUnchangedRegions.minimumLineCount,
|
|
271
|
+
markdownDescription: localize(196, "Controls how many lines are used as a minimum for unchanged regions."),
|
|
272
|
+
minimum: 1,
|
|
273
|
+
},
|
|
274
|
+
'diffEditor.hideUnchangedRegions.contextLineCount': {
|
|
275
|
+
type: 'integer',
|
|
276
|
+
default: diffEditorDefaultOptions.hideUnchangedRegions.contextLineCount,
|
|
277
|
+
markdownDescription: localize(197, "Controls how many lines are used as context when comparing unchanged regions."),
|
|
278
|
+
minimum: 1,
|
|
279
|
+
},
|
|
280
|
+
'diffEditor.experimental.showMoves': {
|
|
281
|
+
type: 'boolean',
|
|
282
|
+
default: diffEditorDefaultOptions.experimental.showMoves,
|
|
283
|
+
markdownDescription: localize(198, "Controls whether the diff editor should show detected code moves.")
|
|
284
|
+
},
|
|
285
|
+
'diffEditor.experimental.showEmptyDecorations': {
|
|
286
|
+
type: 'boolean',
|
|
287
|
+
default: diffEditorDefaultOptions.experimental.showEmptyDecorations,
|
|
288
|
+
description: localize(199, "Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."),
|
|
289
|
+
},
|
|
290
|
+
'diffEditor.experimental.useTrueInlineView': {
|
|
291
|
+
type: 'boolean',
|
|
292
|
+
default: diffEditorDefaultOptions.experimental.useTrueInlineView,
|
|
293
|
+
description: localize(200, "If enabled and the editor uses the inline view, word changes are rendered inline."),
|
|
294
|
+
},
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
function isConfigurationPropertySchema(x) {
|
|
298
|
+
return (typeof x.type !== 'undefined' || typeof x.anyOf !== 'undefined');
|
|
299
|
+
}
|
|
300
|
+
// Add properties from the Editor Option Registry
|
|
301
|
+
for (const editorOption of editorOptionsRegistry) {
|
|
302
|
+
const schema = editorOption.schema;
|
|
303
|
+
if (typeof schema !== 'undefined') {
|
|
304
|
+
if (isConfigurationPropertySchema(schema)) {
|
|
305
|
+
// This is a single schema contribution
|
|
306
|
+
editorConfiguration.properties[`editor.${editorOption.name}`] = schema;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
for (const key in schema) {
|
|
310
|
+
if (Object.hasOwnProperty.call(schema, key)) {
|
|
311
|
+
editorConfiguration.properties[key] = schema[key];
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
let cachedEditorConfigurationKeys = null;
|
|
318
|
+
function getEditorConfigurationKeys() {
|
|
319
|
+
if (cachedEditorConfigurationKeys === null) {
|
|
320
|
+
cachedEditorConfigurationKeys = Object.create(null);
|
|
321
|
+
Object.keys(editorConfiguration.properties).forEach((prop) => {
|
|
322
|
+
cachedEditorConfigurationKeys[prop] = true;
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
return cachedEditorConfigurationKeys;
|
|
326
|
+
}
|
|
327
|
+
function isEditorConfigurationKey(key) {
|
|
328
|
+
const editorConfigurationKeys = getEditorConfigurationKeys();
|
|
329
|
+
return (editorConfigurationKeys[`editor.${key}`] || false);
|
|
330
|
+
}
|
|
331
|
+
function isDiffEditorConfigurationKey(key) {
|
|
332
|
+
const editorConfigurationKeys = getEditorConfigurationKeys();
|
|
333
|
+
return (editorConfigurationKeys[`diffEditor.${key}`] || false);
|
|
334
|
+
}
|
|
335
|
+
const configurationRegistry = Registry.as(Extensions.Configuration);
|
|
336
|
+
configurationRegistry.registerConfiguration(editorConfiguration);
|
|
337
|
+
|
|
338
|
+
export { editorConfigurationBaseNode, isDiffEditorConfigurationKey, isEditorConfigurationKey };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { localize } from '../../nls.js';
|
|
2
|
+
import { RawContextKey } from '../../platform/contextkey/common/contextkey.js';
|
|
3
|
+
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
var EditorContextKeys;
|
|
9
|
+
(function (EditorContextKeys) {
|
|
10
|
+
EditorContextKeys.editorSimpleInput = new RawContextKey('editorSimpleInput', false, true);
|
|
11
|
+
/**
|
|
12
|
+
* A context key that is set when the editor's text has focus (cursor is blinking).
|
|
13
|
+
* Is false when focus is in simple editor widgets (repl input, scm commit input).
|
|
14
|
+
*/
|
|
15
|
+
EditorContextKeys.editorTextFocus = new RawContextKey('editorTextFocus', false, localize(681, "Whether the editor text has focus (cursor is blinking)"));
|
|
16
|
+
/**
|
|
17
|
+
* A context key that is set when the editor's text or an editor's widget has focus.
|
|
18
|
+
*/
|
|
19
|
+
EditorContextKeys.focus = new RawContextKey('editorFocus', false, localize(682, "Whether the editor or an editor widget has focus (e.g. focus is in the find widget)"));
|
|
20
|
+
/**
|
|
21
|
+
* A context key that is set when any editor input has focus (regular editor, repl input...).
|
|
22
|
+
*/
|
|
23
|
+
EditorContextKeys.textInputFocus = new RawContextKey('textInputFocus', false, localize(683, "Whether an editor or a rich text input has focus (cursor is blinking)"));
|
|
24
|
+
EditorContextKeys.readOnly = new RawContextKey('editorReadonly', false, localize(684, "Whether the editor is read-only"));
|
|
25
|
+
EditorContextKeys.inDiffEditor = new RawContextKey('inDiffEditor', false, localize(685, "Whether the context is a diff editor"));
|
|
26
|
+
EditorContextKeys.isEmbeddedDiffEditor = new RawContextKey('isEmbeddedDiffEditor', false, localize(686, "Whether the context is an embedded diff editor"));
|
|
27
|
+
EditorContextKeys.inMultiDiffEditor = new RawContextKey('inMultiDiffEditor', false, localize(687, "Whether the context is a multi diff editor"));
|
|
28
|
+
EditorContextKeys.multiDiffEditorAllCollapsed = new RawContextKey('multiDiffEditorAllCollapsed', undefined, localize(688, "Whether all files in multi diff editor are collapsed"));
|
|
29
|
+
EditorContextKeys.hasChanges = new RawContextKey('diffEditorHasChanges', false, localize(689, "Whether the diff editor has changes"));
|
|
30
|
+
EditorContextKeys.comparingMovedCode = new RawContextKey('comparingMovedCode', false, localize(690, "Whether a moved code block is selected for comparison"));
|
|
31
|
+
EditorContextKeys.accessibleDiffViewerVisible = new RawContextKey('accessibleDiffViewerVisible', false, localize(691, "Whether the accessible diff viewer is visible"));
|
|
32
|
+
EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached = new RawContextKey('diffEditorRenderSideBySideInlineBreakpointReached', false, localize(692, "Whether the diff editor render side by side inline breakpoint is reached"));
|
|
33
|
+
EditorContextKeys.diffEditorInlineMode = new RawContextKey('diffEditorInlineMode', false, localize(693, "Whether inline mode is active"));
|
|
34
|
+
EditorContextKeys.diffEditorOriginalWritable = new RawContextKey('diffEditorOriginalWritable', false, localize(694, "Whether modified is writable in the diff editor"));
|
|
35
|
+
EditorContextKeys.diffEditorModifiedWritable = new RawContextKey('diffEditorModifiedWritable', false, localize(695, "Whether modified is writable in the diff editor"));
|
|
36
|
+
EditorContextKeys.diffEditorOriginalUri = new RawContextKey('diffEditorOriginalUri', '', localize(696, "The uri of the original document"));
|
|
37
|
+
EditorContextKeys.diffEditorModifiedUri = new RawContextKey('diffEditorModifiedUri', '', localize(697, "The uri of the modified document"));
|
|
38
|
+
EditorContextKeys.columnSelection = new RawContextKey('editorColumnSelection', false, localize(698, "Whether `editor.columnSelection` is enabled"));
|
|
39
|
+
EditorContextKeys.writable = EditorContextKeys.readOnly.toNegated();
|
|
40
|
+
EditorContextKeys.hasNonEmptySelection = new RawContextKey('editorHasSelection', false, localize(699, "Whether the editor has text selected"));
|
|
41
|
+
EditorContextKeys.hasOnlyEmptySelection = EditorContextKeys.hasNonEmptySelection.toNegated();
|
|
42
|
+
EditorContextKeys.hasMultipleSelections = new RawContextKey('editorHasMultipleSelections', false, localize(700, "Whether the editor has multiple selections"));
|
|
43
|
+
EditorContextKeys.hasSingleSelection = EditorContextKeys.hasMultipleSelections.toNegated();
|
|
44
|
+
EditorContextKeys.tabMovesFocus = new RawContextKey('editorTabMovesFocus', false, localize(701, "Whether `Tab` will move focus out of the editor"));
|
|
45
|
+
EditorContextKeys.tabDoesNotMoveFocus = EditorContextKeys.tabMovesFocus.toNegated();
|
|
46
|
+
EditorContextKeys.isInEmbeddedEditor = new RawContextKey('isInEmbeddedEditor', false, true);
|
|
47
|
+
EditorContextKeys.canUndo = new RawContextKey('canUndo', false, true);
|
|
48
|
+
EditorContextKeys.canRedo = new RawContextKey('canRedo', false, true);
|
|
49
|
+
EditorContextKeys.hoverVisible = new RawContextKey('editorHoverVisible', false, localize(702, "Whether the editor hover is visible"));
|
|
50
|
+
EditorContextKeys.hoverFocused = new RawContextKey('editorHoverFocused', false, localize(703, "Whether the editor hover is focused"));
|
|
51
|
+
EditorContextKeys.stickyScrollFocused = new RawContextKey('stickyScrollFocused', false, localize(704, "Whether the sticky scroll is focused"));
|
|
52
|
+
EditorContextKeys.stickyScrollVisible = new RawContextKey('stickyScrollVisible', false, localize(705, "Whether the sticky scroll is visible"));
|
|
53
|
+
EditorContextKeys.standaloneColorPickerVisible = new RawContextKey('standaloneColorPickerVisible', false, localize(706, "Whether the standalone color picker is visible"));
|
|
54
|
+
EditorContextKeys.standaloneColorPickerFocused = new RawContextKey('standaloneColorPickerFocused', false, localize(707, "Whether the standalone color picker is focused"));
|
|
55
|
+
/**
|
|
56
|
+
* A context key that is set when an editor is part of a larger editor, like notebooks or
|
|
57
|
+
* (future) a diff editor
|
|
58
|
+
*/
|
|
59
|
+
EditorContextKeys.inCompositeEditor = new RawContextKey('inCompositeEditor', undefined, localize(708, "Whether the editor is part of a larger editor (e.g. notebooks)"));
|
|
60
|
+
EditorContextKeys.notInCompositeEditor = EditorContextKeys.inCompositeEditor.toNegated();
|
|
61
|
+
// -- mode context keys
|
|
62
|
+
EditorContextKeys.languageId = new RawContextKey('editorLangId', '', localize(709, "The language identifier of the editor"));
|
|
63
|
+
EditorContextKeys.hasCompletionItemProvider = new RawContextKey('editorHasCompletionItemProvider', false, localize(710, "Whether the editor has a completion item provider"));
|
|
64
|
+
EditorContextKeys.hasCodeActionsProvider = new RawContextKey('editorHasCodeActionsProvider', false, localize(711, "Whether the editor has a code actions provider"));
|
|
65
|
+
EditorContextKeys.hasCodeLensProvider = new RawContextKey('editorHasCodeLensProvider', false, localize(712, "Whether the editor has a code lens provider"));
|
|
66
|
+
EditorContextKeys.hasDefinitionProvider = new RawContextKey('editorHasDefinitionProvider', false, localize(713, "Whether the editor has a definition provider"));
|
|
67
|
+
EditorContextKeys.hasDeclarationProvider = new RawContextKey('editorHasDeclarationProvider', false, localize(714, "Whether the editor has a declaration provider"));
|
|
68
|
+
EditorContextKeys.hasImplementationProvider = new RawContextKey('editorHasImplementationProvider', false, localize(715, "Whether the editor has an implementation provider"));
|
|
69
|
+
EditorContextKeys.hasTypeDefinitionProvider = new RawContextKey('editorHasTypeDefinitionProvider', false, localize(716, "Whether the editor has a type definition provider"));
|
|
70
|
+
EditorContextKeys.hasHoverProvider = new RawContextKey('editorHasHoverProvider', false, localize(717, "Whether the editor has a hover provider"));
|
|
71
|
+
EditorContextKeys.hasDocumentHighlightProvider = new RawContextKey('editorHasDocumentHighlightProvider', false, localize(718, "Whether the editor has a document highlight provider"));
|
|
72
|
+
EditorContextKeys.hasDocumentSymbolProvider = new RawContextKey('editorHasDocumentSymbolProvider', false, localize(719, "Whether the editor has a document symbol provider"));
|
|
73
|
+
EditorContextKeys.hasReferenceProvider = new RawContextKey('editorHasReferenceProvider', false, localize(720, "Whether the editor has a reference provider"));
|
|
74
|
+
EditorContextKeys.hasRenameProvider = new RawContextKey('editorHasRenameProvider', false, localize(721, "Whether the editor has a rename provider"));
|
|
75
|
+
EditorContextKeys.hasSignatureHelpProvider = new RawContextKey('editorHasSignatureHelpProvider', false, localize(722, "Whether the editor has a signature help provider"));
|
|
76
|
+
EditorContextKeys.hasInlayHintsProvider = new RawContextKey('editorHasInlayHintsProvider', false, localize(723, "Whether the editor has an inline hints provider"));
|
|
77
|
+
// -- mode context keys: formatting
|
|
78
|
+
EditorContextKeys.hasDocumentFormattingProvider = new RawContextKey('editorHasDocumentFormattingProvider', false, localize(724, "Whether the editor has a document formatting provider"));
|
|
79
|
+
EditorContextKeys.hasDocumentSelectionFormattingProvider = new RawContextKey('editorHasDocumentSelectionFormattingProvider', false, localize(725, "Whether the editor has a document selection formatting provider"));
|
|
80
|
+
EditorContextKeys.hasMultipleDocumentFormattingProvider = new RawContextKey('editorHasMultipleDocumentFormattingProvider', false, localize(726, "Whether the editor has multiple document formatting providers"));
|
|
81
|
+
EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider = new RawContextKey('editorHasMultipleDocumentSelectionFormattingProvider', false, localize(727, "Whether the editor has multiple document selection formatting providers"));
|
|
82
|
+
})(EditorContextKeys || (EditorContextKeys = {}));
|
|
83
|
+
|
|
84
|
+
export { EditorContextKeys };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
const editorFeatures = [];
|
|
6
|
+
/**
|
|
7
|
+
* Registers an editor feature. Editor features will be instantiated only once, as soon as
|
|
8
|
+
* the first code editor is instantiated.
|
|
9
|
+
*/
|
|
10
|
+
function registerEditorFeature(ctor) {
|
|
11
|
+
editorFeatures.push(ctor);
|
|
12
|
+
}
|
|
13
|
+
function getEditorFeatures() {
|
|
14
|
+
return editorFeatures.slice(0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { getEditorFeatures, registerEditorFeature };
|