monaco-editor-core 0.58.0 → 0.59.0-dev-20261124
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/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +2 -0
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +3 -0
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxNative.js +4 -2
- package/esm/vs/base/browser/ui/selectBox/selectBoxNative.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +27 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/common/cancellation.js +3 -1
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +8 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +15 -6
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/view.js +3 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +12 -8
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/viewLine.js +7 -11
- package/esm/vs/editor/browser/viewParts/viewLines/viewLine.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +246 -238
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/esm/vs/editor/common/editorContextKeys.js +53 -53
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +3 -1
- package/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -0
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -11
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +13 -13
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findWidget.js +29 -29
- package/esm/vs/editor/contrib/folding/browser/folding.css +15 -0
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidget.js +0 -5
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js +0 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverWidgetWrapper.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +6 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverTypes.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +19 -39
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +7 -7
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/indentation/common/indentation.js +14 -3
- package/esm/vs/editor/contrib/indentation/common/indentation.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +11 -10
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +93 -38
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
- package/esm/vs/editor/editor.api.d.ts +5 -0
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +68 -68
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +30 -31
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +12 -12
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +3 -3
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationModels.js +15 -3
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +12 -12
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/confettiColors.js +6 -6
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/indentation/common/indentation.ts","vs/editor/contrib/indentation/common/indentation.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAwB,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAG7G,MAAM,UAAU,yBAAyB,CAAC,KAAiB,EAAE,4BAA2D,EAAE,eAAuB,EAAE,aAAqB;IACvK,IAAI,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,C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5C,CAAC;QAED,IAAI,cAAc,KAAK,sBAAsB,EAAE,CAAC;YAC/C,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;QAC1L,CAAC;QAED,mCAAmC;QACnC,IAAI,2BAA2B,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1D,yGAAyG;YACzG,4DAA4D;YAC5D,SAAS;QACV,CAAC;aAAM,IAAI,2BAA2B,CAAC,cAAc,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE,CAAC;YACvF,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;YACzC,sBAAsB,GAAG,YAAY,CAAC;QACvC,CAAC;aAAM,IAAI,2BAA2B,CAAC,oBAAoB,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE,CAAC;YAC7F,sBAAsB,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;QAC9D,CAAC;aAAM,CAAC;YACP,sBAAsB,GAAG,YAAY,CAAC;QACvC,CAAC;IACF,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAiB,EAAE,UAAkB;IACrE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QACvD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAChE,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,qCAA6B,CAAC;AACxE,CAAC","file":"indentation.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as strings from '../../../../base/common/strings.js';\nimport { ShiftCommand } from '../../../common/commands/shiftCommand.js';\nimport { EditOperation, ISingleEditOperation } from '../../../common/core/editOperation.js';\nimport { normalizeIndentation } from '../../../common/core/misc/indentation.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ProcessedIndentRulesSupport } from '../../../common/languages/supports/indentationLineProcessor.js';\nimport { ITextModel } from '../../../common/model.js';\n\nexport function getReindentEditOperations(model: ITextModel, languageConfigurationService: ILanguageConfigurationService, startLineNumber: number, endLineNumber: number): ISingleEditOperation[] {\n\tif (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\n\t\t// Model is empty\n\t\treturn [];\n\t}\n\n\tconst indentationRulesSupport = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).indentRulesSupport;\n\tif (!indentationRulesSupport) {\n\t\treturn [];\n\t}\n\n\tconst processedIndentRulesSupport = new ProcessedIndentRulesSupport(model, indentationRulesSupport, languageConfigurationService);\n\tendLineNumber = Math.min(endLineNumber, model.getLineCount());\n\n\t// Skip `unIndentedLinePattern` lines\n\twhile (startLineNumber <= endLineNumber) {\n\t\tif (!processedIndentRulesSupport.shouldIgnore(startLineNumber)) {\n\t\t\tbreak;\n\t\t}\n\n\t\tstartLineNumber++;\n\t}\n\n\tif (startLineNumber > endLineNumber - 1) {\n\t\treturn [];\n\t}\n\n\tconst { tabSize, indentSize, insertSpaces } = model.getOptions();\n\tconst shiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst unshiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst indentEdits: ISingleEditOperation[] = [];\n\n\t// indentation being passed to lines below\n\n\t// Calculate indentation for the first line\n\t// If there is no passed-in indentation, we use the indentation of the first line as base.\n\tconst currentLineText = model.getLineContent(startLineNumber);\n\tlet globalIndent = strings.getLeadingWhitespace(currentLineText);\n\t// idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.\n\tlet idealIndentForNextLine: string = globalIndent;\n\n\tif (processedIndentRulesSupport.shouldIncrease(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\tglobalIndent = shiftIndent(globalIndent);\n\t}\n\telse if (processedIndentRulesSupport.shouldIndentNextLine(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t}\n\n\tstartLineNumber++;\n\n\t// Calculate indentation adjustment for all following lines\n\tfor (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n\t\tif (doesLineStartWithString(model, lineNumber)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst text = model.getLineContent(lineNumber);\n\t\tconst oldIndentation = strings.getLeadingWhitespace(text);\n\t\tconst currentIdealIndent = idealIndentForNextLine;\n\n\t\tif (processedIndentRulesSupport.shouldDecrease(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = unshiftIndent(idealIndentForNextLine);\n\t\t\tglobalIndent = unshiftIndent(globalIndent);\n\t\t}\n\n\t\tif (oldIndentation !== idealIndentForNextLine) {\n\t\t\tindentEdits.push(EditOperation.replaceMove(new Selection(lineNumber, 1, lineNumber, oldIndentation.length + 1), normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces)));\n\t\t}\n\n\t\t// calculate idealIndentForNextLine\n\t\tif (processedIndentRulesSupport.shouldIgnore(lineNumber)) {\n\t\t\t// In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines\n\t\t\t// but don't change globalIndent and idealIndentForNextLine.\n\t\t\tcontinue;\n\t\t} else if (processedIndentRulesSupport.shouldIncrease(lineNumber, currentIdealIndent)) {\n\t\t\tglobalIndent = shiftIndent(globalIndent);\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t} else if (processedIndentRulesSupport.shouldIndentNextLine(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\t} else {\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t}\n\t}\n\n\treturn indentEdits;\n}\n\nfunction doesLineStartWithString(model: ITextModel, lineNumber: number): boolean {\n\tif (!model.tokenization.isCheapToTokenize(lineNumber)) {\n\t\treturn false;\n\t}\n\tconst lineTokens = model.tokenization.getLineTokens(lineNumber);\n\treturn lineTokens.getStandardTokenType(0) === StandardTokenType.String;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as strings from '../../../../base/common/strings.js';\nimport { ShiftCommand } from '../../../common/commands/shiftCommand.js';\nimport { EditOperation, ISingleEditOperation } from '../../../common/core/editOperation.js';\nimport { normalizeIndentation } from '../../../common/core/misc/indentation.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ProcessedIndentRulesSupport } from '../../../common/languages/supports/indentationLineProcessor.js';\nimport { ITextModel } from '../../../common/model.js';\n\nexport function getReindentEditOperations(model: ITextModel, languageConfigurationService: ILanguageConfigurationService, startLineNumber: number, endLineNumber: number): ISingleEditOperation[] {\n\tif (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\n\t\t// Model is empty\n\t\treturn [];\n\t}\n\n\tconst indentationRulesSupport = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).indentRulesSupport;\n\tif (!indentationRulesSupport) {\n\t\treturn [];\n\t}\n\n\tconst processedIndentRulesSupport = new ProcessedIndentRulesSupport(model, indentationRulesSupport, languageConfigurationService);\n\tendLineNumber = Math.min(endLineNumber, model.getLineCount());\n\n\t// Skip `unIndentedLinePattern` lines\n\twhile (startLineNumber <= endLineNumber) {\n\t\tif (!processedIndentRulesSupport.shouldIgnore(startLineNumber)) {\n\t\t\tbreak;\n\t\t}\n\n\t\tstartLineNumber++;\n\t}\n\n\tif (startLineNumber > endLineNumber - 1) {\n\t\treturn [];\n\t}\n\n\tconst { tabSize, indentSize, insertSpaces } = model.getOptions();\n\tconst shiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst unshiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst indentEdits: ISingleEditOperation[] = [];\n\n\t// indentation being passed to lines below\n\n\t// Calculate indentation for the first line\n\t// If there is no passed-in indentation, we use the indentation of the first line as base.\n\tconst currentLineText = model.getLineContent(startLineNumber);\n\tlet globalIndent = strings.getLeadingWhitespace(currentLineText);\n\t// idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.\n\tlet idealIndentForNextLine: string = globalIndent;\n\n\tif (processedIndentRulesSupport.shouldIncrease(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\tglobalIndent = shiftIndent(globalIndent);\n\t}\n\telse if (processedIndentRulesSupport.shouldIndentNextLine(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t}\n\n\tstartLineNumber++;\n\n\t// Calculate indentation adjustment for all following lines\n\tfor (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n\t\tif (doesLineStartWithString(model, lineNumber)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst text = model.getLineContent(lineNumber);\n\t\tconst oldIndentation = strings.getLeadingWhitespace(text);\n\t\tconst currentIdealIndent = idealIndentForNextLine;\n\n\t\tif (processedIndentRulesSupport.shouldDecrease(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = unshiftIndent(idealIndentForNextLine);\n\t\t\tglobalIndent = unshiftIndent(globalIndent);\n\t\t}\n\n\t\tif (oldIndentation !== idealIndentForNextLine) {\n\t\t\tindentEdits.push(EditOperation.replaceMove(new Selection(lineNumber, 1, lineNumber, oldIndentation.length + 1), normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces)));\n\t\t}\n\n\t\t// calculate idealIndentForNextLine\n\t\tif (processedIndentRulesSupport.shouldIgnore(lineNumber)) {\n\t\t\t// In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines\n\t\t\t// but don't change globalIndent and idealIndentForNextLine.\n\t\t\tcontinue;\n\t\t} else if (processedIndentRulesSupport.shouldIncrease(lineNumber, currentIdealIndent)) {\n\t\t\tglobalIndent = shiftIndent(globalIndent);\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t} else if (processedIndentRulesSupport.shouldIndentNextLine(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\t} else {\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t}\n\t}\n\n\treturn indentEdits;\n}\n\nfunction doesLineStartWithString(model: ITextModel, lineNumber: number): boolean {\n\tif (!model.tokenization.isCheapToTokenize(lineNumber)) {\n\t\treturn false;\n\t}\n\tconst lineTokens = model.tokenization.getLineTokens(lineNumber);\n\treturn lineTokens.getStandardTokenType(0) === StandardTokenType.String;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/indentation/common/indentation.ts","vs/editor/contrib/indentation/common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C;QAC9D,CAAC;aAAM,CAAC;YACP,sBAAsB,GAAG,YAAY,CAAC;QACvC,CAAC;IACF,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAiB,EAAE,UAAkB;IACrE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QACvD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,gBAAgB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,qCAA6B,CAAC;IACzF,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACd,CAAC;IACD,IAAI,gBAAgB,IAAI,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvE,OAAO,IAAI,CAAC;IACb,CAAC;IACD,0GAA0G;IAC1G,MAAM,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3F,OAAO,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,qCAA6B,CAAC,CAAC,CAAC,KAAK,CAAC;AACzG,CAAC","file":"indentation.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as strings from '../../../../base/common/strings.js';\nimport { ShiftCommand } from '../../../common/commands/shiftCommand.js';\nimport { EditOperation, ISingleEditOperation } from '../../../common/core/editOperation.js';\nimport { normalizeIndentation } from '../../../common/core/misc/indentation.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ProcessedIndentRulesSupport } from '../../../common/languages/supports/indentationLineProcessor.js';\nimport { ITextModel } from '../../../common/model.js';\n\nexport function getReindentEditOperations(model: ITextModel, languageConfigurationService: ILanguageConfigurationService, startLineNumber: number, endLineNumber: number): ISingleEditOperation[] {\n\tif (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\n\t\t// Model is empty\n\t\treturn [];\n\t}\n\n\tconst indentationRulesSupport = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).indentRulesSupport;\n\tif (!indentationRulesSupport) {\n\t\treturn [];\n\t}\n\n\tconst processedIndentRulesSupport = new ProcessedIndentRulesSupport(model, indentationRulesSupport, languageConfigurationService);\n\tendLineNumber = Math.min(endLineNumber, model.getLineCount());\n\n\t// Skip `unIndentedLinePattern` lines\n\twhile (startLineNumber <= endLineNumber) {\n\t\tif (!processedIndentRulesSupport.shouldIgnore(startLineNumber)) {\n\t\t\tbreak;\n\t\t}\n\n\t\tstartLineNumber++;\n\t}\n\n\tif (startLineNumber > endLineNumber - 1) {\n\t\treturn [];\n\t}\n\n\tconst { tabSize, indentSize, insertSpaces } = model.getOptions();\n\tconst shiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst unshiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst indentEdits: ISingleEditOperation[] = [];\n\n\t// indentation being passed to lines below\n\n\t// Calculate indentation for the first line\n\t// If there is no passed-in indentation, we use the indentation of the first line as base.\n\tconst currentLineText = model.getLineContent(startLineNumber);\n\tlet globalIndent = strings.getLeadingWhitespace(currentLineText);\n\t// idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.\n\tlet idealIndentForNextLine: string = globalIndent;\n\n\tif (processedIndentRulesSupport.shouldIncrease(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\tglobalIndent = shiftIndent(globalIndent);\n\t}\n\telse if (processedIndentRulesSupport.shouldIndentNextLine(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t}\n\n\tstartLineNumber++;\n\n\t// Calculate indentation adjustment for all following lines\n\tfor (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n\t\tif (isLineStartInsideString(model, lineNumber)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst text = model.getLineContent(lineNumber);\n\t\tconst oldIndentation = strings.getLeadingWhitespace(text);\n\t\tconst currentIdealIndent = idealIndentForNextLine;\n\n\t\tif (processedIndentRulesSupport.shouldDecrease(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = unshiftIndent(idealIndentForNextLine);\n\t\t\tglobalIndent = unshiftIndent(globalIndent);\n\t\t}\n\n\t\tif (oldIndentation !== idealIndentForNextLine) {\n\t\t\tindentEdits.push(EditOperation.replaceMove(new Selection(lineNumber, 1, lineNumber, oldIndentation.length + 1), normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces)));\n\t\t}\n\n\t\t// calculate idealIndentForNextLine\n\t\tif (processedIndentRulesSupport.shouldIgnore(lineNumber)) {\n\t\t\t// In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines\n\t\t\t// but don't change globalIndent and idealIndentForNextLine.\n\t\t\tcontinue;\n\t\t} else if (processedIndentRulesSupport.shouldIncrease(lineNumber, currentIdealIndent)) {\n\t\t\tglobalIndent = shiftIndent(globalIndent);\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t} else if (processedIndentRulesSupport.shouldIndentNextLine(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\t} else {\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t}\n\t}\n\n\treturn indentEdits;\n}\n\nfunction isLineStartInsideString(model: ITextModel, lineNumber: number): boolean {\n\tif (!model.tokenization.isCheapToTokenize(lineNumber)) {\n\t\treturn false;\n\t}\n\tmodel.tokenization.tokenizeIfCheap(lineNumber);\n\tconst lineTokens = model.tokenization.getLineTokens(lineNumber);\n\tconst line = model.getLineContent(lineNumber);\n\tconst startsWithString = lineTokens.getStandardTokenType(0) === StandardTokenType.String;\n\tif (line.length > 0 && !startsWithString) {\n\t\treturn false;\n\t}\n\tif (startsWithString && strings.getLeadingWhitespace(line).length > 0) {\n\t\treturn true;\n\t}\n\t// Tokenize inserted whitespace to distinguish a new string from a continuation, including on empty lines.\n\tconst tokensWithIndent = model.tokenization.tokenizeLinesAt(lineNumber, [` ${line}`])?.[0];\n\treturn tokensWithIndent ? tokensWithIndent.getStandardTokenType(0) === StandardTokenType.String : false;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as strings from '../../../../base/common/strings.js';\nimport { ShiftCommand } from '../../../common/commands/shiftCommand.js';\nimport { EditOperation, ISingleEditOperation } from '../../../common/core/editOperation.js';\nimport { normalizeIndentation } from '../../../common/core/misc/indentation.js';\nimport { Selection } from '../../../common/core/selection.js';\nimport { StandardTokenType } from '../../../common/encodedTokenAttributes.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ProcessedIndentRulesSupport } from '../../../common/languages/supports/indentationLineProcessor.js';\nimport { ITextModel } from '../../../common/model.js';\n\nexport function getReindentEditOperations(model: ITextModel, languageConfigurationService: ILanguageConfigurationService, startLineNumber: number, endLineNumber: number): ISingleEditOperation[] {\n\tif (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\n\t\t// Model is empty\n\t\treturn [];\n\t}\n\n\tconst indentationRulesSupport = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).indentRulesSupport;\n\tif (!indentationRulesSupport) {\n\t\treturn [];\n\t}\n\n\tconst processedIndentRulesSupport = new ProcessedIndentRulesSupport(model, indentationRulesSupport, languageConfigurationService);\n\tendLineNumber = Math.min(endLineNumber, model.getLineCount());\n\n\t// Skip `unIndentedLinePattern` lines\n\twhile (startLineNumber <= endLineNumber) {\n\t\tif (!processedIndentRulesSupport.shouldIgnore(startLineNumber)) {\n\t\t\tbreak;\n\t\t}\n\n\t\tstartLineNumber++;\n\t}\n\n\tif (startLineNumber > endLineNumber - 1) {\n\t\treturn [];\n\t}\n\n\tconst { tabSize, indentSize, insertSpaces } = model.getOptions();\n\tconst shiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst unshiftIndent = (indentation: string, count?: number) => {\n\t\tcount = count || 1;\n\t\treturn ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\n\t};\n\tconst indentEdits: ISingleEditOperation[] = [];\n\n\t// indentation being passed to lines below\n\n\t// Calculate indentation for the first line\n\t// If there is no passed-in indentation, we use the indentation of the first line as base.\n\tconst currentLineText = model.getLineContent(startLineNumber);\n\tlet globalIndent = strings.getLeadingWhitespace(currentLineText);\n\t// idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.\n\tlet idealIndentForNextLine: string = globalIndent;\n\n\tif (processedIndentRulesSupport.shouldIncrease(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\tglobalIndent = shiftIndent(globalIndent);\n\t}\n\telse if (processedIndentRulesSupport.shouldIndentNextLine(startLineNumber)) {\n\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t}\n\n\tstartLineNumber++;\n\n\t// Calculate indentation adjustment for all following lines\n\tfor (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\n\t\tif (isLineStartInsideString(model, lineNumber)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst text = model.getLineContent(lineNumber);\n\t\tconst oldIndentation = strings.getLeadingWhitespace(text);\n\t\tconst currentIdealIndent = idealIndentForNextLine;\n\n\t\tif (processedIndentRulesSupport.shouldDecrease(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = unshiftIndent(idealIndentForNextLine);\n\t\t\tglobalIndent = unshiftIndent(globalIndent);\n\t\t}\n\n\t\tif (oldIndentation !== idealIndentForNextLine) {\n\t\t\tindentEdits.push(EditOperation.replaceMove(new Selection(lineNumber, 1, lineNumber, oldIndentation.length + 1), normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces)));\n\t\t}\n\n\t\t// calculate idealIndentForNextLine\n\t\tif (processedIndentRulesSupport.shouldIgnore(lineNumber)) {\n\t\t\t// In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines\n\t\t\t// but don't change globalIndent and idealIndentForNextLine.\n\t\t\tcontinue;\n\t\t} else if (processedIndentRulesSupport.shouldIncrease(lineNumber, currentIdealIndent)) {\n\t\t\tglobalIndent = shiftIndent(globalIndent);\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t} else if (processedIndentRulesSupport.shouldIndentNextLine(lineNumber, currentIdealIndent)) {\n\t\t\tidealIndentForNextLine = shiftIndent(idealIndentForNextLine);\n\t\t} else {\n\t\t\tidealIndentForNextLine = globalIndent;\n\t\t}\n\t}\n\n\treturn indentEdits;\n}\n\nfunction isLineStartInsideString(model: ITextModel, lineNumber: number): boolean {\n\tif (!model.tokenization.isCheapToTokenize(lineNumber)) {\n\t\treturn false;\n\t}\n\tmodel.tokenization.tokenizeIfCheap(lineNumber);\n\tconst lineTokens = model.tokenization.getLineTokens(lineNumber);\n\tconst line = model.getLineContent(lineNumber);\n\tconst startsWithString = lineTokens.getStandardTokenType(0) === StandardTokenType.String;\n\tif (line.length > 0 && !startsWithString) {\n\t\treturn false;\n\t}\n\tif (startsWithString && strings.getLeadingWhitespace(line).length > 0) {\n\t\treturn true;\n\t}\n\t// Tokenize inserted whitespace to distinguish a new string from a continuation, including on empty lines.\n\tconst tokensWithIndent = model.tokenization.tokenizeLinesAt(lineNumber, [` ${line}`])?.[0];\n\treturn tokensWithIndent ? tokensWithIndent.getStandardTokenType(0) === StandardTokenType.String : false;\n}\n"]}
|
|
@@ -82,7 +82,7 @@ let InlayHintsHover = class InlayHintsHover extends MarkdownHoverParticipant {
|
|
|
82
82
|
}
|
|
83
83
|
// (1.2) Inlay dbl-click gesture
|
|
84
84
|
if (isNonEmptyArray(part.item.hint.textEdits)) {
|
|
85
|
-
executor.emitOne(new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(localize(
|
|
85
|
+
executor.emitOne(new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(localize(1230, "Double-click to insert"))], false, 10001));
|
|
86
86
|
}
|
|
87
87
|
// (2) Inlay Label Part Tooltip
|
|
88
88
|
let partTooltip;
|
|
@@ -101,19 +101,19 @@ let InlayHintsHover = class InlayHintsHover extends MarkdownHoverParticipant {
|
|
|
101
101
|
const useMetaKey = this._editor.getOption(87 /* EditorOption.multiCursorModifier */) === 'altKey';
|
|
102
102
|
const kb = useMetaKey
|
|
103
103
|
? platform.isMacintosh
|
|
104
|
-
? localize(
|
|
105
|
-
: localize(
|
|
104
|
+
? localize(1231, "cmd + click")
|
|
105
|
+
: localize(1232, "ctrl + click")
|
|
106
106
|
: platform.isMacintosh
|
|
107
|
-
? localize(
|
|
108
|
-
: localize(
|
|
107
|
+
? localize(1233, "option + click")
|
|
108
|
+
: localize(1234, "alt + click");
|
|
109
109
|
if (part.part.location && part.part.command) {
|
|
110
|
-
linkHint = new MarkdownString().appendText(localize(
|
|
110
|
+
linkHint = new MarkdownString().appendText(localize(1235, 'Go to Definition ({0}), right click for more', kb));
|
|
111
111
|
}
|
|
112
112
|
else if (part.part.location) {
|
|
113
|
-
linkHint = new MarkdownString().appendText(localize(
|
|
113
|
+
linkHint = new MarkdownString().appendText(localize(1236, 'Go to Definition ({0})', kb));
|
|
114
114
|
}
|
|
115
115
|
else if (part.part.command) {
|
|
116
|
-
linkHint = new MarkdownString(`[${localize(
|
|
116
|
+
linkHint = new MarkdownString(`[${localize(1237, "Execute Command")}](${asCommandLink(part.part.command)} "${part.part.command.title}") (${kb})`, { isTrusted: true });
|
|
117
117
|
}
|
|
118
118
|
if (linkHint) {
|
|
119
119
|
executor.emitOne(new MarkdownHover(this, anchor.range, [linkHint], false, 10000));
|
|
@@ -25,7 +25,7 @@ export class ShowNextInlineSuggestionAction extends EditorAction {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
super({
|
|
27
27
|
id: ShowNextInlineSuggestionAction.ID,
|
|
28
|
-
label: nls.localize2(
|
|
28
|
+
label: nls.localize2(1249, "Show Next Inline Suggestion"),
|
|
29
29
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
30
30
|
kbOpts: {
|
|
31
31
|
weight: 100,
|
|
@@ -43,7 +43,7 @@ export class ShowPreviousInlineSuggestionAction extends EditorAction {
|
|
|
43
43
|
constructor() {
|
|
44
44
|
super({
|
|
45
45
|
id: ShowPreviousInlineSuggestionAction.ID,
|
|
46
|
-
label: nls.localize2(
|
|
46
|
+
label: nls.localize2(1250, "Show Previous Inline Suggestion"),
|
|
47
47
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
48
48
|
kbOpts: {
|
|
49
49
|
weight: 100,
|
|
@@ -75,13 +75,13 @@ export class TriggerInlineSuggestionAction extends EditorAction {
|
|
|
75
75
|
constructor() {
|
|
76
76
|
super({
|
|
77
77
|
id: 'editor.action.inlineSuggest.trigger',
|
|
78
|
-
label: nls.localize2(
|
|
78
|
+
label: nls.localize2(1251, "Trigger Inline Suggestion"),
|
|
79
79
|
precondition: EditorContextKeys.writable,
|
|
80
80
|
metadata: {
|
|
81
|
-
description: nls.localize(
|
|
81
|
+
description: nls.localize(1238, "Triggers an inline suggestion in the editor."),
|
|
82
82
|
args: [{
|
|
83
83
|
name: 'args',
|
|
84
|
-
description: nls.localize(
|
|
84
|
+
description: nls.localize(1239, "Options for triggering inline suggestions."),
|
|
85
85
|
isOptional: true,
|
|
86
86
|
schema: argsValidator.getJSONSchema(),
|
|
87
87
|
}]
|
|
@@ -110,7 +110,7 @@ export class TriggerInlineSuggestionAction extends EditorAction {
|
|
|
110
110
|
if (!controller?.model.get()?.state.get()) {
|
|
111
111
|
notificationService.notify({
|
|
112
112
|
severity: Severity.Info,
|
|
113
|
-
message: nls.localize(
|
|
113
|
+
message: nls.localize(1240, "No inline suggestion is available.")
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -120,7 +120,7 @@ export class AcceptNextWordOfInlineCompletion extends EditorAction {
|
|
|
120
120
|
constructor() {
|
|
121
121
|
super({
|
|
122
122
|
id: 'editor.action.inlineSuggest.acceptNextWord',
|
|
123
|
-
label: nls.localize2(
|
|
123
|
+
label: nls.localize2(1252, "Accept Next Word Of Inline Suggestion"),
|
|
124
124
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
125
125
|
kbOpts: {
|
|
126
126
|
weight: 100 /* KeybindingWeight.EditorContrib */ + 1,
|
|
@@ -129,7 +129,7 @@ export class AcceptNextWordOfInlineCompletion extends EditorAction {
|
|
|
129
129
|
},
|
|
130
130
|
menuOpts: [{
|
|
131
131
|
menuId: MenuId.InlineSuggestionToolbar,
|
|
132
|
-
title: nls.localize(
|
|
132
|
+
title: nls.localize(1241, 'Accept Word'),
|
|
133
133
|
group: 'primary',
|
|
134
134
|
order: 2,
|
|
135
135
|
}],
|
|
@@ -144,14 +144,14 @@ export class AcceptNextLineOfInlineCompletion extends EditorAction {
|
|
|
144
144
|
constructor() {
|
|
145
145
|
super({
|
|
146
146
|
id: 'editor.action.inlineSuggest.acceptNextLine',
|
|
147
|
-
label: nls.localize2(
|
|
147
|
+
label: nls.localize2(1253, "Accept Next Line Of Inline Suggestion"),
|
|
148
148
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
149
149
|
kbOpts: {
|
|
150
150
|
weight: 100 /* KeybindingWeight.EditorContrib */ + 1,
|
|
151
151
|
},
|
|
152
152
|
menuOpts: [{
|
|
153
153
|
menuId: MenuId.InlineSuggestionToolbar,
|
|
154
|
-
title: nls.localize(
|
|
154
|
+
title: nls.localize(1242, 'Accept Line'),
|
|
155
155
|
group: 'secondary',
|
|
156
156
|
order: 2,
|
|
157
157
|
}],
|
|
@@ -166,16 +166,16 @@ export class AcceptInlineCompletion extends EditorAction {
|
|
|
166
166
|
constructor() {
|
|
167
167
|
super({
|
|
168
168
|
id: inlineSuggestCommitId,
|
|
169
|
-
label: nls.localize2(
|
|
169
|
+
label: nls.localize2(1254, "Accept Inline Suggestion"),
|
|
170
170
|
precondition: ContextKeyExpr.or(InlineCompletionContextKeys.inlineSuggestionVisible, InlineCompletionContextKeys.inlineEditVisible),
|
|
171
171
|
menuOpts: [{
|
|
172
172
|
menuId: MenuId.InlineSuggestionToolbar,
|
|
173
|
-
title: nls.localize(
|
|
173
|
+
title: nls.localize(1243, "Accept"),
|
|
174
174
|
group: 'primary',
|
|
175
175
|
order: 2,
|
|
176
176
|
}, {
|
|
177
177
|
menuId: MenuId.InlineEditsActions,
|
|
178
|
-
title: nls.localize(
|
|
178
|
+
title: nls.localize(1244, "Accept"),
|
|
179
179
|
group: 'primary',
|
|
180
180
|
order: 2,
|
|
181
181
|
}],
|
|
@@ -206,7 +206,7 @@ export class AcceptInlineCompletionAlternativeAction extends EditorAction {
|
|
|
206
206
|
constructor() {
|
|
207
207
|
super({
|
|
208
208
|
id: inlineSuggestCommitAlternativeActionId,
|
|
209
|
-
label: nls.localize2(
|
|
209
|
+
label: nls.localize2(1255, "Accept Inline Suggestion Alternative Action"),
|
|
210
210
|
precondition: ContextKeyExpr.and(InlineCompletionContextKeys.inlineSuggestionAlternativeActionVisible, InlineCompletionContextKeys.inlineEditVisible),
|
|
211
211
|
menuOpts: [],
|
|
212
212
|
kbOpts: [
|
|
@@ -235,11 +235,11 @@ export class JumpToNextInlineEdit extends EditorAction {
|
|
|
235
235
|
constructor() {
|
|
236
236
|
super({
|
|
237
237
|
id: jumpToNextInlineEditId,
|
|
238
|
-
label: nls.localize2(
|
|
238
|
+
label: nls.localize2(1256, "Jump to next inline edit"),
|
|
239
239
|
precondition: InlineCompletionContextKeys.inlineEditVisible,
|
|
240
240
|
menuOpts: [{
|
|
241
241
|
menuId: MenuId.InlineEditsActions,
|
|
242
|
-
title: nls.localize(
|
|
242
|
+
title: nls.localize(1245, "Jump"),
|
|
243
243
|
group: 'primary',
|
|
244
244
|
order: 1,
|
|
245
245
|
when: InlineCompletionContextKeys.cursorAtInlineEdit.toNegated(),
|
|
@@ -263,7 +263,7 @@ export class HideInlineCompletion extends EditorAction {
|
|
|
263
263
|
constructor() {
|
|
264
264
|
super({
|
|
265
265
|
id: HideInlineCompletion.ID,
|
|
266
|
-
label: nls.localize2(
|
|
266
|
+
label: nls.localize2(1257, "Hide Inline Suggestion"),
|
|
267
267
|
precondition: ContextKeyExpr.or(InlineCompletionContextKeys.inlineSuggestionVisible, InlineCompletionContextKeys.inlineEditVisible),
|
|
268
268
|
kbOpts: {
|
|
269
269
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -272,7 +272,7 @@ export class HideInlineCompletion extends EditorAction {
|
|
|
272
272
|
},
|
|
273
273
|
menuOpts: [{
|
|
274
274
|
menuId: MenuId.InlineEditsActions,
|
|
275
|
-
title: nls.localize(
|
|
275
|
+
title: nls.localize(1246, "Reject"),
|
|
276
276
|
group: 'primary',
|
|
277
277
|
order: 3,
|
|
278
278
|
}]
|
|
@@ -291,7 +291,7 @@ export class ToggleInlineCompletionShowCollapsed extends EditorAction {
|
|
|
291
291
|
constructor() {
|
|
292
292
|
super({
|
|
293
293
|
id: ToggleInlineCompletionShowCollapsed.ID,
|
|
294
|
-
label: nls.localize2(
|
|
294
|
+
label: nls.localize2(1258, "Toggle Inline Suggestions Show Collapsed"),
|
|
295
295
|
precondition: ContextKeyExpr.true(),
|
|
296
296
|
});
|
|
297
297
|
}
|
|
@@ -313,7 +313,7 @@ export class ToggleAlwaysShowInlineSuggestionToolbar extends Action2 {
|
|
|
313
313
|
constructor() {
|
|
314
314
|
super({
|
|
315
315
|
id: ToggleAlwaysShowInlineSuggestionToolbar.ID,
|
|
316
|
-
title: nls.localize(
|
|
316
|
+
title: nls.localize(1247, "Always Show Toolbar"),
|
|
317
317
|
f1: false,
|
|
318
318
|
precondition: undefined,
|
|
319
319
|
menu: [{
|
|
@@ -335,7 +335,7 @@ export class DevExtractReproSample extends EditorAction {
|
|
|
335
335
|
constructor() {
|
|
336
336
|
super({
|
|
337
337
|
id: 'editor.action.inlineSuggest.dev.extractRepro',
|
|
338
|
-
label: nls.localize(
|
|
338
|
+
label: nls.localize(1248, "Developer: Extract Inline Suggest State"),
|
|
339
339
|
alias: 'Developer: Inline Suggest Extract Repro',
|
|
340
340
|
precondition: ContextKeyExpr.or(InlineCompletionContextKeys.inlineEditVisible, InlineCompletionContextKeys.inlineSuggestionVisible),
|
|
341
341
|
});
|
package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js
CHANGED
|
@@ -6,18 +6,18 @@ import { RawContextKey } from '../../../../../platform/contextkey/common/context
|
|
|
6
6
|
import { localize } from '../../../../../nls.js';
|
|
7
7
|
import * as nls from '../../../../../nls.js';
|
|
8
8
|
export class InlineCompletionContextKeys {
|
|
9
|
-
static { this.inlineSuggestionVisible = new RawContextKey('inlineSuggestionVisible', false, localize(
|
|
10
|
-
static { this.inlineSuggestionAlternativeActionVisible = new RawContextKey('inlineSuggestionAlternativeActionVisible', false, localize(
|
|
11
|
-
static { this.inlineSuggestionHasIndentation = new RawContextKey('inlineSuggestionHasIndentation', false, localize(
|
|
12
|
-
static { this.inlineSuggestionHasIndentationLessThanTabSize = new RawContextKey('inlineSuggestionHasIndentationLessThanTabSize', true, localize(
|
|
13
|
-
static { this.suppressSuggestions = new RawContextKey('inlineSuggestionSuppressSuggestions', undefined, localize(
|
|
14
|
-
static { this.cursorBeforeGhostText = new RawContextKey('cursorBeforeGhostText', false, localize(
|
|
15
|
-
static { this.cursorInIndentation = new RawContextKey('cursorInIndentation', false, localize(
|
|
16
|
-
static { this.hasSelection = new RawContextKey('editor.hasSelection', false, localize(
|
|
17
|
-
static { this.cursorAtInlineEdit = new RawContextKey('cursorAtInlineEdit', false, localize(
|
|
18
|
-
static { this.inlineEditVisible = new RawContextKey('inlineEditIsVisible', false, localize(
|
|
19
|
-
static { this.tabShouldJumpToInlineEdit = new RawContextKey('tabShouldJumpToInlineEdit', false, localize(
|
|
20
|
-
static { this.tabShouldAcceptInlineEdit = new RawContextKey('tabShouldAcceptInlineEdit', false, localize(
|
|
21
|
-
static { this.inInlineEditsPreviewEditor = new RawContextKey('inInlineEditsPreviewEditor', true, nls.localize(
|
|
9
|
+
static { this.inlineSuggestionVisible = new RawContextKey('inlineSuggestionVisible', false, localize(1259, "Whether an inline suggestion is visible")); }
|
|
10
|
+
static { this.inlineSuggestionAlternativeActionVisible = new RawContextKey('inlineSuggestionAlternativeActionVisible', false, localize(1260, "Whether an alternative action for the inline suggestion is visible.")); }
|
|
11
|
+
static { this.inlineSuggestionHasIndentation = new RawContextKey('inlineSuggestionHasIndentation', false, localize(1261, "Whether the inline suggestion starts with whitespace")); }
|
|
12
|
+
static { this.inlineSuggestionHasIndentationLessThanTabSize = new RawContextKey('inlineSuggestionHasIndentationLessThanTabSize', true, localize(1262, "Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")); }
|
|
13
|
+
static { this.suppressSuggestions = new RawContextKey('inlineSuggestionSuppressSuggestions', undefined, localize(1263, "Whether suggestions should be suppressed for the current suggestion")); }
|
|
14
|
+
static { this.cursorBeforeGhostText = new RawContextKey('cursorBeforeGhostText', false, localize(1264, "Whether the cursor is at ghost text")); }
|
|
15
|
+
static { this.cursorInIndentation = new RawContextKey('cursorInIndentation', false, localize(1265, "Whether the cursor is in indentation")); }
|
|
16
|
+
static { this.hasSelection = new RawContextKey('editor.hasSelection', false, localize(1266, "Whether the editor has a selection")); }
|
|
17
|
+
static { this.cursorAtInlineEdit = new RawContextKey('cursorAtInlineEdit', false, localize(1267, "Whether the cursor is at an inline edit")); }
|
|
18
|
+
static { this.inlineEditVisible = new RawContextKey('inlineEditIsVisible', false, localize(1268, "Whether an inline edit is visible")); }
|
|
19
|
+
static { this.tabShouldJumpToInlineEdit = new RawContextKey('tabShouldJumpToInlineEdit', false, localize(1269, "Whether tab should jump to an inline edit.")); }
|
|
20
|
+
static { this.tabShouldAcceptInlineEdit = new RawContextKey('tabShouldAcceptInlineEdit', false, localize(1270, "Whether tab should accept the inline edit.")); }
|
|
21
|
+
static { this.inInlineEditsPreviewEditor = new RawContextKey('inInlineEditsPreviewEditor', true, nls.localize(1271, "Whether the current code editor is showing an inline edits preview")); }
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=inlineCompletionContextKeys.js.map
|
package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js
CHANGED
|
@@ -320,17 +320,17 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
320
320
|
if (tabShouldAccept) {
|
|
321
321
|
const kb = this._keybindingService.lookupKeybinding(inlineSuggestCommitId)?.getAriaLabel();
|
|
322
322
|
content = kb
|
|
323
|
-
? localize(
|
|
324
|
-
: localize(
|
|
323
|
+
? localize(1272, "Next edit suggestion available on line {0}, press {1} to accept", lineNumber, kb)
|
|
324
|
+
: localize(1273, "Next edit suggestion available on line {0}, accept it to apply", lineNumber);
|
|
325
325
|
}
|
|
326
326
|
else if (tabShouldJump) {
|
|
327
327
|
const kb = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId)?.getAriaLabel();
|
|
328
328
|
content = kb
|
|
329
|
-
? localize(
|
|
330
|
-
: localize(
|
|
329
|
+
? localize(1274, "Next edit suggestion available on line {0}, press {1} to jump", lineNumber, kb)
|
|
330
|
+
: localize(1275, "Next edit suggestion available on line {0}", lineNumber);
|
|
331
331
|
}
|
|
332
332
|
else {
|
|
333
|
-
content = localize(
|
|
333
|
+
content = localize(1276, "Next edit suggestion available on line {0}", lineNumber);
|
|
334
334
|
}
|
|
335
335
|
this._provideScreenReaderUpdate(content);
|
|
336
336
|
}
|
|
@@ -402,7 +402,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
402
402
|
const accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView');
|
|
403
403
|
let hint;
|
|
404
404
|
if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(173 /* EditorOption.inlineCompletionsAccessibilityVerbose */)) {
|
|
405
|
-
hint = localize(
|
|
405
|
+
hint = localize(1277, "Inspect this in the accessible view ({0})", accessibleViewKeybinding.getAriaLabel());
|
|
406
406
|
}
|
|
407
407
|
alert(hint ? content + ', ' + hint : content);
|
|
408
408
|
}
|
|
@@ -116,7 +116,7 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
|
|
|
116
116
|
return new RenderedHoverParts([renderedHoverPart]);
|
|
117
117
|
}
|
|
118
118
|
getAccessibleContent(hoverPart) {
|
|
119
|
-
return nls.localize(
|
|
119
|
+
return nls.localize(1278, 'There are inline completions here');
|
|
120
120
|
}
|
|
121
121
|
renderScreenReaderText(context, part) {
|
|
122
122
|
const disposables = new DisposableStore();
|
|
@@ -124,7 +124,7 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
|
|
|
124
124
|
const markdownHoverElement = $('div.hover-row.markdown-hover');
|
|
125
125
|
const hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents', { ['aria-live']: 'assertive' }));
|
|
126
126
|
const render = (code) => {
|
|
127
|
-
const inlineSuggestionAvailable = nls.localize(
|
|
127
|
+
const inlineSuggestionAvailable = nls.localize(1279, "Suggestion:");
|
|
128
128
|
const renderedContents = disposables.add(this._markdownRendererService.render(new MarkdownString().appendText(inlineSuggestionAvailable).appendCodeblock('text', code), {
|
|
129
129
|
context: this._editor,
|
|
130
130
|
asyncRenderCallback: () => {
|
package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js
CHANGED
|
@@ -98,8 +98,8 @@ InlineCompletionsHintsWidget = __decorate([
|
|
|
98
98
|
__param(2, IInstantiationService)
|
|
99
99
|
], InlineCompletionsHintsWidget);
|
|
100
100
|
export { InlineCompletionsHintsWidget };
|
|
101
|
-
const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize(
|
|
102
|
-
const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize(
|
|
101
|
+
const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize(1280, 'Icon for show next parameter hint.'));
|
|
102
|
+
const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize(1281, 'Icon for show previous parameter hint.'));
|
|
103
103
|
let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidget extends Disposable {
|
|
104
104
|
static { InlineSuggestionHintsContentWidget_1 = this; }
|
|
105
105
|
static { this.hot = createHotClass(this); }
|
|
@@ -154,9 +154,9 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
|
|
|
154
154
|
this._warningMessageNode.element,
|
|
155
155
|
h('div@toolBar'),
|
|
156
156
|
]);
|
|
157
|
-
this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, localize(
|
|
157
|
+
this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, localize(1282, 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)));
|
|
158
158
|
this.availableSuggestionCountAction = this._register(new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false));
|
|
159
|
-
this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, localize(
|
|
159
|
+
this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, localize(1283, 'Next'), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)));
|
|
160
160
|
this.inlineCompletionsActionsMenus = this._register(this._menuService.createMenu(MenuId.InlineCompletionsActions, this._contextKeyService));
|
|
161
161
|
this.clearAvailableSuggestionCountLabelDebounced = this._register(new RunOnceScheduler(() => {
|
|
162
162
|
this.availableSuggestionCountAction.label = '';
|
|
@@ -415,11 +415,11 @@ let RenameSymbolProcessor = class RenameSymbolProcessor extends Disposable {
|
|
|
415
415
|
});
|
|
416
416
|
const command = {
|
|
417
417
|
id: renameSymbolCommandId,
|
|
418
|
-
title: localize(
|
|
418
|
+
title: localize(1284, "Rename"),
|
|
419
419
|
arguments: [source, this._renameRunnable],
|
|
420
420
|
};
|
|
421
421
|
const alternativeAction = {
|
|
422
|
-
label: localize(
|
|
422
|
+
label: localize(1285, "Rename"),
|
|
423
423
|
icon: Codicon.replaceAll,
|
|
424
424
|
command,
|
|
425
425
|
count: this._renameRunnable.getCount(),
|
|
@@ -81,13 +81,13 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
81
81
|
const title = header(this._data.displayName);
|
|
82
82
|
const gotoAndAccept = option(createOptionArgs({
|
|
83
83
|
id: 'gotoAndAccept',
|
|
84
|
-
title: localize(
|
|
84
|
+
title: localize(1286, "Go To / Accept"),
|
|
85
85
|
icon: Codicon.check,
|
|
86
86
|
commandId: inlineSuggestCommitId,
|
|
87
87
|
}));
|
|
88
88
|
const reject = option(createOptionArgs({
|
|
89
89
|
id: 'reject',
|
|
90
|
-
title: localize(
|
|
90
|
+
title: localize(1287, "Reject"),
|
|
91
91
|
icon: Codicon.close,
|
|
92
92
|
commandId: hideInlineCompletionId
|
|
93
93
|
}));
|
|
@@ -112,25 +112,25 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
|
|
|
112
112
|
const toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?
|
|
113
113
|
option(createOptionArgs({
|
|
114
114
|
id: 'showExpanded',
|
|
115
|
-
title: localize(
|
|
115
|
+
title: localize(1288, "Show Expanded"),
|
|
116
116
|
icon: Codicon.expandAll,
|
|
117
117
|
commandId: toggleShowCollapsedId
|
|
118
118
|
}))
|
|
119
119
|
: option(createOptionArgs({
|
|
120
120
|
id: 'showCollapsed',
|
|
121
|
-
title: localize(
|
|
121
|
+
title: localize(1289, "Show Collapsed"),
|
|
122
122
|
icon: Codicon.collapseAll,
|
|
123
123
|
commandId: toggleShowCollapsedId
|
|
124
124
|
})));
|
|
125
125
|
const snooze = option(createOptionArgs({
|
|
126
126
|
id: 'snooze',
|
|
127
|
-
title: localize(
|
|
127
|
+
title: localize(1290, "Snooze"),
|
|
128
128
|
icon: Codicon.bellSlash,
|
|
129
129
|
commandId: 'editor.action.inlineSuggest.snooze'
|
|
130
130
|
}));
|
|
131
131
|
const settings = option(createOptionArgs({
|
|
132
132
|
id: 'settings',
|
|
133
|
-
title: localize(
|
|
133
|
+
title: localize(1291, "Settings"),
|
|
134
134
|
icon: Codicon.gear,
|
|
135
135
|
commandId: 'workbench.action.openSettings',
|
|
136
136
|
commandArgs: ['@tag:nextEditSuggestions']
|
|
@@ -46,7 +46,7 @@ export class InlineSuggestionGutterMenuData {
|
|
|
46
46
|
static fromInlineSuggestion(suggestion) {
|
|
47
47
|
const alternativeAction = suggestion.action?.kind === 'edit' ? suggestion.action.alternativeAction : undefined;
|
|
48
48
|
const commands = suggestion.source.inlineSuggestions.commands ?? [];
|
|
49
|
-
return new InlineSuggestionGutterMenuData(suggestion.gutterMenuLinkAction, suggestion.source.provider.displayName ?? localize(
|
|
49
|
+
return new InlineSuggestionGutterMenuData(suggestion.gutterMenuLinkAction, suggestion.source.provider.displayName ?? localize(1292, "Inline Suggestion"), commands.length > 0 ? [commands] : [], alternativeAction, suggestion.source.provider.modelInfo, suggestion.source.provider.setModelId?.bind(suggestion.source.provider));
|
|
50
50
|
}
|
|
51
51
|
constructor(action, displayName, extensionCommands, alternativeAction, modelInfo, setModelId, extensionCommandsOnly = false) {
|
|
52
52
|
this.action = action;
|
|
@@ -123,10 +123,10 @@ let InlineEditsWordReplacementView = class InlineEditsWordReplacementView extend
|
|
|
123
123
|
const count = altCount.read(reader);
|
|
124
124
|
const active = altModifierActive.read(reader);
|
|
125
125
|
const occurrencesLabel = count !== undefined ? count === 1 ?
|
|
126
|
-
localize(
|
|
127
|
-
localize(
|
|
126
|
+
localize(1293, "{0} 1 occurrence", label) :
|
|
127
|
+
localize(1294, "{0} {1} occurrences", label, count)
|
|
128
128
|
: label;
|
|
129
|
-
const keybindingTooltip = localize(
|
|
129
|
+
const keybindingTooltip = localize(1295, "{0} show occurrences", '[shift]');
|
|
130
130
|
alternativeAction = {
|
|
131
131
|
label: count !== undefined ? (active ? occurrencesLabel : label) : label,
|
|
132
132
|
tooltip: occurrencesLabel ? `${occurrencesLabel}\n${keybindingTooltip}` : undefined,
|
|
@@ -10,63 +10,63 @@ import { buttonBackground, buttonForeground, diffInserted, diffInsertedLine, dif
|
|
|
10
10
|
import { asCssVariable, darken, registerColor, transparent } from '../../../../../../platform/theme/common/colorUtils.js';
|
|
11
11
|
import { InlineCompletionEditorType } from '../../model/provideInlineCompletions.js';
|
|
12
12
|
import { InlineEditTabAction } from './inlineEditsViewInterface.js';
|
|
13
|
-
export const originalBackgroundColor = registerColor('inlineEdit.originalBackground', transparent(diffRemoved, 0.2), localize(
|
|
14
|
-
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(
|
|
15
|
-
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(
|
|
16
|
-
export const originalChangedTextOverlayColor = registerColor('inlineEdit.originalChangedTextBackground', transparent(diffRemoved, 0.8), localize(
|
|
13
|
+
export const originalBackgroundColor = registerColor('inlineEdit.originalBackground', transparent(diffRemoved, 0.2), localize(1296, 'Background color for the original text in inline edits.'), true);
|
|
14
|
+
export const modifiedBackgroundColor = registerColor('inlineEdit.modifiedBackground', transparent(diffInserted, 0.3), localize(1297, 'Background color for the modified text in inline edits.'), true);
|
|
15
|
+
export const originalChangedLineBackgroundColor = registerColor('inlineEdit.originalChangedLineBackground', transparent(diffRemoved, 0.8), localize(1298, 'Background color for the changed lines in the original text of inline edits.'), true);
|
|
16
|
+
export const originalChangedTextOverlayColor = registerColor('inlineEdit.originalChangedTextBackground', transparent(diffRemoved, 0.8), localize(1299, 'Overlay color for the changed text in the original text of inline edits.'), true);
|
|
17
17
|
export const modifiedChangedLineBackgroundColor = registerColor('inlineEdit.modifiedChangedLineBackground', {
|
|
18
18
|
light: transparent(diffInsertedLine, 0.7),
|
|
19
19
|
dark: transparent(diffInsertedLine, 0.7),
|
|
20
20
|
hcDark: diffInsertedLine,
|
|
21
21
|
hcLight: diffInsertedLine
|
|
22
|
-
}, localize(
|
|
23
|
-
export const modifiedChangedTextOverlayColor = registerColor('inlineEdit.modifiedChangedTextBackground', transparent(diffInserted, 0.7), localize(
|
|
22
|
+
}, localize(1300, 'Background color for the changed lines in the modified text of inline edits.'), true);
|
|
23
|
+
export const modifiedChangedTextOverlayColor = registerColor('inlineEdit.modifiedChangedTextBackground', transparent(diffInserted, 0.7), localize(1301, 'Overlay color for the changed text in the modified text of inline edits.'), true);
|
|
24
24
|
// ------- GUTTER INDICATOR -------
|
|
25
|
-
export const inlineEditIndicatorPrimaryForeground = registerColor('inlineEdit.gutterIndicator.primaryForeground', buttonForeground, localize(
|
|
26
|
-
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(
|
|
25
|
+
export const inlineEditIndicatorPrimaryForeground = registerColor('inlineEdit.gutterIndicator.primaryForeground', buttonForeground, localize(1302, 'Foreground color for the primary inline edit gutter indicator.'));
|
|
26
|
+
export const inlineEditIndicatorPrimaryBorder = registerColor('inlineEdit.gutterIndicator.primaryBorder', buttonBackground, localize(1303, 'Border color for the primary inline edit gutter indicator.'));
|
|
27
27
|
export const inlineEditIndicatorPrimaryBackground = registerColor('inlineEdit.gutterIndicator.primaryBackground', {
|
|
28
28
|
light: transparent(inlineEditIndicatorPrimaryBorder, 0.5),
|
|
29
29
|
dark: transparent(inlineEditIndicatorPrimaryBorder, 0.4),
|
|
30
30
|
hcDark: transparent(inlineEditIndicatorPrimaryBorder, 0.4),
|
|
31
31
|
hcLight: transparent(inlineEditIndicatorPrimaryBorder, 0.5),
|
|
32
|
-
}, localize(
|
|
33
|
-
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', editorHoverForeground, localize(
|
|
34
|
-
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', editorHoverBorder, localize(
|
|
35
|
-
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', editorHoverBackground, localize(
|
|
36
|
-
export const inlineEditIndicatorSuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(
|
|
37
|
-
export const inlineEditIndicatorSuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(
|
|
38
|
-
export const inlineEditIndicatorSuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorSuccessfulBorder, localize(
|
|
32
|
+
}, localize(1304, 'Background color for the primary inline edit gutter indicator.'));
|
|
33
|
+
export const inlineEditIndicatorSecondaryForeground = registerColor('inlineEdit.gutterIndicator.secondaryForeground', editorHoverForeground, localize(1305, 'Foreground color for the secondary inline edit gutter indicator.'));
|
|
34
|
+
export const inlineEditIndicatorSecondaryBorder = registerColor('inlineEdit.gutterIndicator.secondaryBorder', editorHoverBorder, localize(1306, 'Border color for the secondary inline edit gutter indicator.'));
|
|
35
|
+
export const inlineEditIndicatorSecondaryBackground = registerColor('inlineEdit.gutterIndicator.secondaryBackground', editorHoverBackground, localize(1307, 'Background color for the secondary inline edit gutter indicator.'));
|
|
36
|
+
export const inlineEditIndicatorSuccessfulForeground = registerColor('inlineEdit.gutterIndicator.successfulForeground', buttonForeground, localize(1308, 'Foreground color for the successful inline edit gutter indicator.'));
|
|
37
|
+
export const inlineEditIndicatorSuccessfulBorder = registerColor('inlineEdit.gutterIndicator.successfulBorder', buttonBackground, localize(1309, 'Border color for the successful inline edit gutter indicator.'));
|
|
38
|
+
export const inlineEditIndicatorSuccessfulBackground = registerColor('inlineEdit.gutterIndicator.successfulBackground', inlineEditIndicatorSuccessfulBorder, localize(1310, 'Background color for the successful inline edit gutter indicator.'));
|
|
39
39
|
export const inlineEditIndicatorBackground = registerColor('inlineEdit.gutterIndicator.background', {
|
|
40
40
|
hcDark: transparent('tab.inactiveBackground', 0.5),
|
|
41
41
|
hcLight: transparent('tab.inactiveBackground', 0.5),
|
|
42
42
|
dark: transparent('tab.inactiveBackground', 0.5),
|
|
43
43
|
light: '#5f5f5f18',
|
|
44
|
-
}, localize(
|
|
44
|
+
}, localize(1311, 'Background color for the inline edit gutter indicator.'));
|
|
45
45
|
// ------- BORDER COLORS -------
|
|
46
46
|
const originalBorder = registerColor('inlineEdit.originalBorder', {
|
|
47
47
|
light: diffRemoved,
|
|
48
48
|
dark: diffRemoved,
|
|
49
49
|
hcDark: diffRemoved,
|
|
50
50
|
hcLight: diffRemoved
|
|
51
|
-
}, localize(
|
|
51
|
+
}, localize(1312, 'Border color for the original text in inline edits.'));
|
|
52
52
|
const modifiedBorder = registerColor('inlineEdit.modifiedBorder', {
|
|
53
53
|
light: darken(diffInserted, 0.6),
|
|
54
54
|
dark: diffInserted,
|
|
55
55
|
hcDark: diffInserted,
|
|
56
56
|
hcLight: diffInserted
|
|
57
|
-
}, localize(
|
|
57
|
+
}, localize(1313, 'Border color for the modified text in inline edits.'));
|
|
58
58
|
const tabWillAcceptModifiedBorder = registerColor('inlineEdit.tabWillAcceptModifiedBorder', {
|
|
59
59
|
light: darken(modifiedBorder, 0),
|
|
60
60
|
dark: darken(modifiedBorder, 0),
|
|
61
61
|
hcDark: darken(modifiedBorder, 0),
|
|
62
62
|
hcLight: darken(modifiedBorder, 0)
|
|
63
|
-
}, localize(
|
|
63
|
+
}, localize(1314, 'Modified border color for the inline edits widget when tab will accept it.'));
|
|
64
64
|
const tabWillAcceptOriginalBorder = registerColor('inlineEdit.tabWillAcceptOriginalBorder', {
|
|
65
65
|
light: darken(originalBorder, 0),
|
|
66
66
|
dark: darken(originalBorder, 0),
|
|
67
67
|
hcDark: darken(originalBorder, 0),
|
|
68
68
|
hcLight: darken(originalBorder, 0)
|
|
69
|
-
}, localize(
|
|
69
|
+
}, localize(1315, 'Original border color for the inline edits widget over the original text when tab will accept it.'));
|
|
70
70
|
export function getModifiedBorderColor(tabAction) {
|
|
71
71
|
return tabAction.map(a => a === InlineEditTabAction.Accept ? tabWillAcceptModifiedBorder : modifiedBorder);
|
|
72
72
|
}
|
|
@@ -11,7 +11,7 @@ export class InsertFinalNewLineAction extends EditorAction {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: InsertFinalNewLineAction.ID,
|
|
14
|
-
label: nls.localize2(
|
|
14
|
+
label: nls.localize2(1318, "Insert Final New Line"),
|
|
15
15
|
precondition: EditorContextKeys.writable
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export class ExpandLineSelectionAction extends EditorAction {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super({
|
|
12
12
|
id: 'expandLineSelection',
|
|
13
|
-
label: nls.localize2(
|
|
13
|
+
label: nls.localize2(1319, "Expand Line Selection"),
|
|
14
14
|
precondition: undefined,
|
|
15
15
|
kbOpts: {
|
|
16
16
|
weight: 0 /* KeybindingWeight.EditorCore */,
|