monaco-editor-core 0.57.0 → 0.58.0-dev-20261104
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 +38 -6
- package/esm/vs/base/browser/browser.js +8 -0
- package/esm/vs/base/browser/browser.js.map +1 -1
- package/esm/vs/base/browser/contextmenu.js +8 -1
- package/esm/vs/base/browser/contextmenu.js.map +1 -1
- package/esm/vs/base/browser/dom.js +34 -5
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +2457 -2640
- package/esm/vs/base/browser/markdownRenderer.js +48 -21
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +3 -2
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +7 -2
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/animations/animations.js +68 -40
- package/esm/vs/base/browser/ui/animations/animations.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +7 -0
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/contextview/contextview.css +15 -0
- package/esm/vs/base/browser/ui/contextview/contextview.js +266 -40
- package/esm/vs/base/browser/ui/contextview/contextview.js.map +1 -1
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js +72 -0
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js.map +1 -0
- package/esm/vs/base/browser/ui/dialog/dialog.css +5 -0
- package/esm/vs/base/browser/ui/dropdown/dropdown.js +2 -1
- package/esm/vs/base/browser/ui/dropdown/dropdown.js.map +1 -1
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listView.js +87 -15
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +37 -15
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/menu/menu.js +189 -52
- package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
- package/esm/vs/base/browser/ui/radio/radio.css +11 -0
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -8
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/splitview/splitview.js +11 -7
- package/esm/vs/base/browser/ui/splitview/splitview.js.map +1 -1
- package/esm/vs/base/browser/ui/toggle/switch.css +16 -7
- package/esm/vs/base/browser/ui/toggle/switch.js +9 -6
- package/esm/vs/base/browser/ui/toggle/switch.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.css +1 -2
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +85 -38
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +48 -9
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +10 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js +3 -0
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/actions.js +8 -2
- package/esm/vs/base/common/actions.js.map +1 -1
- package/esm/vs/base/common/arrays.js +4 -4
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +12 -8
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/cancellation.js +25 -0
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codicons.js +2 -0
- package/esm/vs/base/common/codicons.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/color.js +1 -1
- package/esm/vs/base/common/color.js.map +1 -1
- package/esm/vs/base/common/diff/diff.js +60 -1
- package/esm/vs/base/common/diff/diff.js.map +1 -1
- package/esm/vs/base/common/event.js +1 -1
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -0
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +74 -12
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/base/common/json.js +19 -0
- package/esm/vs/base/common/json.js.map +1 -0
- package/esm/vs/base/common/network.js +16 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/resources.js +14 -2
- package/esm/vs/base/common/resources.js.map +1 -1
- package/esm/vs/base/common/strings.js +1 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/base/common/uri.js +2 -2
- package/esm/vs/base/common/uri.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js +19 -6
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +11 -5
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -38
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +12 -10
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +7 -7
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js +19 -0
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js.map +1 -0
- package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js +3 -2
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +6 -2
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +34 -11
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/viewController.js +7 -7
- package/esm/vs/editor/browser/view/viewController.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
- package/esm/vs/editor/browser/view.js +5 -5
- package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +11 -3
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +12 -12
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +9 -2
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
- package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
- package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +6 -6
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +9 -2
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +5 -5
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
- package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +5 -5
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
- package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
- package/esm/vs/editor/browser/viewParts/wordWrapIndicator/wordWrapIndicator.js +2 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +22 -21
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +18 -18
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +21 -3
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js +21 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +11 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js +1 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js.map +1 -1
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js +64 -0
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js.map +1 -0
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +68 -58
- package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +560 -500
- 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/core/edits/textEdit.js +16 -0
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursor.js +20 -10
- package/esm/vs/editor/common/cursor/cursor.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +67 -14
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js.map +1 -1
- package/esm/vs/editor/common/cursorCommon.js +22 -21
- package/esm/vs/editor/common/cursorCommon.js.map +1 -1
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +21 -8
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js +38 -26
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/rangeMapping.js +11 -1
- package/esm/vs/editor/common/diff/rangeMapping.js.map +1 -1
- package/esm/vs/editor/common/diff/verifyLinesDiff.js +28 -0
- package/esm/vs/editor/common/diff/verifyLinesDiff.js.map +1 -0
- package/esm/vs/editor/common/editorContextKeys.js +53 -53
- package/esm/vs/editor/common/languages/languageConfiguration.js +8 -0
- package/esm/vs/editor/common/languages/languageConfiguration.js.map +1 -1
- 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/services/editorWebWorker.js +27 -6
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorker.js.map +1 -1
- package/esm/vs/editor/common/services/languageService.js +6 -4
- package/esm/vs/editor/common/services/languageService.js.map +1 -1
- package/esm/vs/editor/common/services/markerDecorationsService.js +21 -2
- package/esm/vs/editor/common/services/markerDecorationsService.js.map +1 -1
- package/esm/vs/editor/common/standalone/standaloneEnums.js +100 -97
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -11
- package/esm/vs/editor/common/textModelEditSource.js +9 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLayout.js +16 -16
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +19 -19
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +9 -9
- 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 +23 -20
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- 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/codeActionModel.js +1 -1
- 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/colorDetector.js +25 -10
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- 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/hoverColorPickerContribution.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +17 -17
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- 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 +39 -39
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- 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/pasteEditSession.js +19 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js.map +1 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +26 -18
- 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/editorState/browser/keybindingCancellation.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +18 -18
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +40 -40
- package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
- 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/clickLinkGesture.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js.map +1 -1
- 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/contentHoverController.js +9 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- 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/markdownHoverParticipant.js +10 -8
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
- 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/inlayHints/browser/inlayHintsController.js +5 -5
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +9 -9
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +3 -3
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js.map +1 -1
- 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 +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +7 -7
- 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 +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +5 -4
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js.map +1 -1
- package/esm/vs/editor/contrib/links/browser/links.js +16 -15
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +16 -12
- package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +91 -55
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +6 -4
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- 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/placeholderText/browser/placeholderTextContribution.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 +3 -3
- 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/sectionHeaders/browser/sectionHeaders.js +6 -6
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +23 -13
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- 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/stickyScroll/browser/stickyScrollController.js +10 -8
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +6 -6
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +15 -15
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +27 -27
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +8 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/wordDistance.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 +27 -27
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js.map +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +50 -14
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +6 -6
- package/esm/vs/editor/editor.api.d.ts +133 -98
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +5 -3
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +15 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/nls.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +72 -66
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js.map +1 -1
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +434 -136
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +74 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +24 -26
- package/esm/vs/platform/actionWidget/browser/actionWidget.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js +16 -0
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js.map +1 -0
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -17
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +25 -12
- package/esm/vs/platform/actions/browser/toolbar.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js +4 -2
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +15 -8
- package/esm/vs/platform/actions/common/menuService.js.map +1 -1
- package/esm/vs/platform/configuration/common/configuration.js +3 -1
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +16 -11
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +29 -27
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js +13 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +2 -2
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +28 -14
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js +17 -4
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextView.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextViewService.js +7 -2
- package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/editor/common/editor.js +17 -0
- package/esm/vs/platform/editor/common/editor.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverService.js +6 -3
- package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +38 -6
- package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +32 -5
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/esm/vs/platform/keybinding/common/keybindingResolver.js +1 -1
- package/esm/vs/platform/keybinding/common/keybindingResolver.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +11 -8
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/markers/common/markers.js.map +1 -1
- package/esm/vs/platform/notification/common/notification.js.map +1 -1
- package/esm/vs/platform/notification/common/notificationMessage.js +37 -0
- package/esm/vs/platform/notification/common/notificationMessage.js.map +1 -0
- package/esm/vs/platform/opener/common/opener.js.map +1 -1
- package/esm/vs/platform/progress/common/progress.js.map +1 -1
- 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/media/quickInput.css +33 -2
- package/esm/vs/platform/quickinput/browser/quickAccess.js +7 -4
- package/esm/vs/platform/quickinput/browser/quickAccess.js.map +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 +65 -15
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +96 -90
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputService.js +5 -7
- package/esm/vs/platform/quickinput/browser/quickInputService.js.map +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/quickinput/common/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/storage/common/storage.js.map +1 -1
- package/esm/vs/platform/theme/common/colorRegistry.js +1 -0
- package/esm/vs/platform/theme/common/colorRegistry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +11 -3
- package/esm/vs/platform/theme/common/colorUtils.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -9
- package/esm/vs/platform/theme/common/colors/chartsColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/confettiColors.js +14 -0
- package/esm/vs/platform/theme/common/colors/confettiColors.js.map +1 -0
- 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/inputColors.js.map +1 -1
- 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 +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- 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 +133 -98
- package/package.json +3 -3
- package/version.txt +1 -1
|
@@ -30,10 +30,10 @@ export class IndentationToSpacesAction extends EditorAction {
|
|
|
30
30
|
constructor() {
|
|
31
31
|
super({
|
|
32
32
|
id: IndentationToSpacesAction.ID,
|
|
33
|
-
label: nls.localize2(
|
|
33
|
+
label: nls.localize2(1211, "Convert Indentation to Spaces"),
|
|
34
34
|
precondition: EditorContextKeys.writable,
|
|
35
35
|
metadata: {
|
|
36
|
-
description: nls.localize2(
|
|
36
|
+
description: nls.localize2(1212, "Convert the tab indentation to spaces."),
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -61,10 +61,10 @@ export class IndentationToTabsAction extends EditorAction {
|
|
|
61
61
|
constructor() {
|
|
62
62
|
super({
|
|
63
63
|
id: IndentationToTabsAction.ID,
|
|
64
|
-
label: nls.localize2(
|
|
64
|
+
label: nls.localize2(1213, "Convert Indentation to Tabs"),
|
|
65
65
|
precondition: EditorContextKeys.writable,
|
|
66
66
|
metadata: {
|
|
67
|
-
description: nls.localize2(
|
|
67
|
+
description: nls.localize2(1214, "Convert the spaces indentation to tabs."),
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
}
|
|
@@ -107,17 +107,17 @@ export class ChangeIndentationSizeAction extends EditorAction {
|
|
|
107
107
|
label: n.toString(),
|
|
108
108
|
// add description for tabSize value set in the configuration
|
|
109
109
|
description: (n === creationOpts.tabSize && n === modelOpts.tabSize
|
|
110
|
-
? nls.localize(
|
|
110
|
+
? nls.localize(1207, "Configured Tab Size")
|
|
111
111
|
: n === creationOpts.tabSize
|
|
112
|
-
? nls.localize(
|
|
112
|
+
? nls.localize(1208, "Default Tab Size")
|
|
113
113
|
: n === modelOpts.tabSize
|
|
114
|
-
? nls.localize(
|
|
114
|
+
? nls.localize(1209, "Current Tab Size")
|
|
115
115
|
: undefined)
|
|
116
116
|
}));
|
|
117
117
|
// auto focus the tabSize set for the current editor
|
|
118
118
|
const autoFocusIndex = Math.min(model.getOptions().tabSize - 1, 7);
|
|
119
119
|
setTimeout(() => {
|
|
120
|
-
quickInputService.pick(picks, { placeHolder: nls.localize(
|
|
120
|
+
quickInputService.pick(picks, { placeHolder: nls.localize(1210, "Select Tab Size for Current File"), activeItem: picks[autoFocusIndex] }).then(pick => {
|
|
121
121
|
if (pick) {
|
|
122
122
|
if (model && !model.isDisposed()) {
|
|
123
123
|
const pickedVal = parseInt(pick.label, 10);
|
|
@@ -144,10 +144,10 @@ export class IndentUsingTabs extends ChangeIndentationSizeAction {
|
|
|
144
144
|
constructor() {
|
|
145
145
|
super(false, false, {
|
|
146
146
|
id: IndentUsingTabs.ID,
|
|
147
|
-
label: nls.localize2(
|
|
147
|
+
label: nls.localize2(1215, "Indent Using Tabs"),
|
|
148
148
|
precondition: undefined,
|
|
149
149
|
metadata: {
|
|
150
|
-
description: nls.localize2(
|
|
150
|
+
description: nls.localize2(1216, "Use indentation with tabs."),
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
}
|
|
@@ -157,10 +157,10 @@ export class IndentUsingSpaces extends ChangeIndentationSizeAction {
|
|
|
157
157
|
constructor() {
|
|
158
158
|
super(true, false, {
|
|
159
159
|
id: IndentUsingSpaces.ID,
|
|
160
|
-
label: nls.localize2(
|
|
160
|
+
label: nls.localize2(1217, "Indent Using Spaces"),
|
|
161
161
|
precondition: undefined,
|
|
162
162
|
metadata: {
|
|
163
|
-
description: nls.localize2(
|
|
163
|
+
description: nls.localize2(1218, "Use indentation with spaces."),
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
166
|
}
|
|
@@ -170,10 +170,10 @@ export class ChangeTabDisplaySize extends ChangeIndentationSizeAction {
|
|
|
170
170
|
constructor() {
|
|
171
171
|
super(true, true, {
|
|
172
172
|
id: ChangeTabDisplaySize.ID,
|
|
173
|
-
label: nls.localize2(
|
|
173
|
+
label: nls.localize2(1219, "Change Tab Display Size"),
|
|
174
174
|
precondition: undefined,
|
|
175
175
|
metadata: {
|
|
176
|
-
description: nls.localize2(
|
|
176
|
+
description: nls.localize2(1220, "Change the space size equivalent of the tab."),
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
}
|
|
@@ -183,10 +183,10 @@ export class DetectIndentation extends EditorAction {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: DetectIndentation.ID,
|
|
186
|
-
label: nls.localize2(
|
|
186
|
+
label: nls.localize2(1221, "Detect Indentation from Content"),
|
|
187
187
|
precondition: undefined,
|
|
188
188
|
metadata: {
|
|
189
|
-
description: nls.localize2(
|
|
189
|
+
description: nls.localize2(1222, "Detect the indentation from content."),
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
}
|
|
@@ -204,10 +204,10 @@ export class ReindentLinesAction extends EditorAction {
|
|
|
204
204
|
constructor() {
|
|
205
205
|
super({
|
|
206
206
|
id: 'editor.action.reindentlines',
|
|
207
|
-
label: nls.localize2(
|
|
207
|
+
label: nls.localize2(1223, "Reindent Lines"),
|
|
208
208
|
precondition: EditorContextKeys.writable,
|
|
209
209
|
metadata: {
|
|
210
|
-
description: nls.localize2(
|
|
210
|
+
description: nls.localize2(1224, "Reindent the lines of the editor."),
|
|
211
211
|
},
|
|
212
212
|
canTriggerInlineEdits: true,
|
|
213
213
|
});
|
|
@@ -230,10 +230,10 @@ export class ReindentSelectedLinesAction extends EditorAction {
|
|
|
230
230
|
constructor() {
|
|
231
231
|
super({
|
|
232
232
|
id: 'editor.action.reindentselectedlines',
|
|
233
|
-
label: nls.localize2(
|
|
233
|
+
label: nls.localize2(1225, "Reindent Selected Lines"),
|
|
234
234
|
precondition: EditorContextKeys.writable,
|
|
235
235
|
metadata: {
|
|
236
|
-
description: nls.localize2(
|
|
236
|
+
description: nls.localize2(1226, "Reindent the selected lines of the editor."),
|
|
237
237
|
},
|
|
238
238
|
canTriggerInlineEdits: true,
|
|
239
239
|
});
|
|
@@ -130,7 +130,7 @@ let InlayHintsController = class InlayHintsController {
|
|
|
130
130
|
this._disposables.add(_editor.onDidChangeModel(() => this._update()));
|
|
131
131
|
this._disposables.add(_editor.onDidChangeModelLanguage(() => this._update()));
|
|
132
132
|
this._disposables.add(_editor.onDidChangeConfiguration(e => {
|
|
133
|
-
if (e.hasChanged(
|
|
133
|
+
if (e.hasChanged(162 /* EditorOption.inlayHints */)) {
|
|
134
134
|
this._update();
|
|
135
135
|
}
|
|
136
136
|
}));
|
|
@@ -144,7 +144,7 @@ let InlayHintsController = class InlayHintsController {
|
|
|
144
144
|
_update() {
|
|
145
145
|
this._sessionDisposables.clear();
|
|
146
146
|
this._removeAllDecorations();
|
|
147
|
-
const options = this._editor.getOption(
|
|
147
|
+
const options = this._editor.getOption(162 /* EditorOption.inlayHints */);
|
|
148
148
|
if (options.enabled === 'off') {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
@@ -248,7 +248,7 @@ let InlayHintsController = class InlayHintsController {
|
|
|
248
248
|
scheduler.schedule();
|
|
249
249
|
}));
|
|
250
250
|
this._sessionDisposables.add(this._editor.onDidChangeConfiguration(e => {
|
|
251
|
-
if (e.hasChanged(
|
|
251
|
+
if (e.hasChanged(162 /* EditorOption.inlayHints */)) {
|
|
252
252
|
scheduler.schedule();
|
|
253
253
|
}
|
|
254
254
|
}));
|
|
@@ -490,7 +490,7 @@ let InlayHintsController = class InlayHintsController {
|
|
|
490
490
|
addInjectedText(item, marginRule, '', isLast ? InjectedTextCursorStops.Right : InjectedTextCursorStops.None, InlayHintsController_1._whitespaceData, widthInEm);
|
|
491
491
|
};
|
|
492
492
|
//
|
|
493
|
-
const maxLength = this._editor.getOption(
|
|
493
|
+
const maxLength = this._editor.getOption(162 /* EditorOption.inlayHints */).maximumLength;
|
|
494
494
|
const fontFamilyVar = '--code-editorInlayHintsFontFamily';
|
|
495
495
|
this._editor.getContainerDomNode().style.setProperty(fontFamilyVar, fontFamily);
|
|
496
496
|
let currentLineInfo = { line: 0, totalLen: 0 };
|
|
@@ -626,7 +626,7 @@ let InlayHintsController = class InlayHintsController {
|
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
_getLayoutInfo() {
|
|
629
|
-
const options = this._editor.getOption(
|
|
629
|
+
const options = this._editor.getOption(162 /* EditorOption.inlayHints */);
|
|
630
630
|
const padding = options.padding;
|
|
631
631
|
const editorFontSize = this._editor.getOption(61 /* EditorOption.fontSize */);
|
|
632
632
|
const editorFontFamily = this._editor.getOption(58 /* EditorOption.fontFamily */);
|
|
@@ -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(1227, "Double-click to insert"))], false, 10001));
|
|
86
86
|
}
|
|
87
87
|
// (2) Inlay Label Part Tooltip
|
|
88
88
|
let partTooltip;
|
|
@@ -98,22 +98,22 @@ let InlayHintsHover = class InlayHintsHover extends MarkdownHoverParticipant {
|
|
|
98
98
|
// (2.2) Inlay Label Part Help Hover
|
|
99
99
|
if (part.part.location || part.part.command) {
|
|
100
100
|
let linkHint;
|
|
101
|
-
const useMetaKey = this._editor.getOption(
|
|
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(1228, "cmd + click")
|
|
105
|
+
: localize(1229, "ctrl + click")
|
|
106
106
|
: platform.isMacintosh
|
|
107
|
-
? localize(
|
|
108
|
-
: localize(
|
|
107
|
+
? localize(1230, "option + click")
|
|
108
|
+
: localize(1231, "alt + click");
|
|
109
109
|
if (part.part.location && part.part.command) {
|
|
110
|
-
linkHint = new MarkdownString().appendText(localize(
|
|
110
|
+
linkHint = new MarkdownString().appendText(localize(1232, '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(1233, 'Go to Definition ({0})', kb));
|
|
114
114
|
}
|
|
115
115
|
else if (part.part.command) {
|
|
116
|
-
linkHint = new MarkdownString(`[${localize(
|
|
116
|
+
linkHint = new MarkdownString(`[${localize(1234, "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));
|
|
@@ -64,7 +64,7 @@ export async function showGoToContextMenu(accessor, editor, anchor, part) {
|
|
|
64
64
|
}));
|
|
65
65
|
}
|
|
66
66
|
// show context menu
|
|
67
|
-
const useShadowDOM = editor.getOption(
|
|
67
|
+
const useShadowDOM = editor.getOption(147 /* EditorOption.useShadowDOM */);
|
|
68
68
|
contextMenuService.showContextMenu({
|
|
69
69
|
domForShadowRoot: useShadowDOM ? editor.getDomNode() ?? undefined : undefined,
|
|
70
70
|
getAnchor: () => {
|
|
@@ -75,7 +75,7 @@ export async function showGoToContextMenu(accessor, editor, anchor, part) {
|
|
|
75
75
|
onHide: () => {
|
|
76
76
|
editor.focus();
|
|
77
77
|
},
|
|
78
|
-
|
|
78
|
+
autoSelectItem: true,
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
export async function goToDefinitionWithLocation(accessor, event, editor, location) {
|
|
@@ -85,7 +85,7 @@ export async function goToDefinitionWithLocation(accessor, event, editor, locati
|
|
|
85
85
|
const openToSide = event.hasSideBySideModifier;
|
|
86
86
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
87
87
|
const isInPeek = PeekContext.inPeekEditor.getValue(contextKeyService);
|
|
88
|
-
const canPeek = !openToSide && editor.getOption(
|
|
88
|
+
const canPeek = !openToSide && editor.getOption(103 /* EditorOption.definitionLinkOpensInPeek */) && !isInPeek;
|
|
89
89
|
const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });
|
|
90
90
|
return action.run(accessor, new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range)), Range.lift(location.range));
|
|
91
91
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.ts","vs/editor/contrib/inlayHints/browser/inlayHintsLocations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,MAAM,EAAW,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAG5H,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAoB,MAAM,4DAA4D,CAAC;AACrH,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,0DAA0D,CAAC;AAE1G,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,QAA0B,EAAE,MAAmB,EAAE,MAAmB,EAAE,IAAgC;IAE/I,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxD,MAAM,kBAAkB,GAAG,QAAQ,CAAC,GAAG,CA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,kDAAwC,IAAI,CAAC,QAAQ,CAAC;QAErG,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC;QACrK,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACzJ,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,OAAO,EAAE,CAAC;AACf,CAAC","file":"inlayHintsLocations.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 dom from '../../../../base/browser/dom.js';\nimport { Action, IAction, Separator } from '../../../../base/common/actions.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { generateUuid } from '../../../../base/common/uuid.js';\nimport { IActiveCodeEditor, ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Location } from '../../../common/languages.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { DefinitionAction, SymbolNavigationAction, SymbolNavigationAnchor } from '../../gotoSymbol/browser/goToCommands.js';\nimport { ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { RenderedInlayHintLabelPart } from './inlayHintsController.js';\nimport { PeekContext } from '../../peekView/browser/peekView.js';\nimport { isIMenuItem, MenuId, MenuItemAction, MenuRegistry } from '../../../../platform/actions/common/actions.js';\nimport { ICommandService } from '../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';\nimport { INotificationService, Severity } from '../../../../platform/notification/common/notification.js';\n\nexport async function showGoToContextMenu(accessor: ServicesAccessor, editor: ICodeEditor, anchor: HTMLElement, part: RenderedInlayHintLabelPart) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst contextMenuService = accessor.get(IContextMenuService);\n\tconst commandService = accessor.get(ICommandService);\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst notificationService = accessor.get(INotificationService);\n\n\tawait part.item.resolve(CancellationToken.None);\n\n\tif (!part.part.location) {\n\t\treturn;\n\t}\n\n\tconst location: Location = part.part.location;\n\tconst menuActions: IAction[] = [];\n\n\t// from all registered (not active) context menu actions select those\n\t// that are a symbol navigation actions\n\tconst filter = new Set(MenuRegistry.getMenuItems(MenuId.EditorContext)\n\t\t.map(item => isIMenuItem(item) ? item.command.id : generateUuid()));\n\n\tfor (const delegate of SymbolNavigationAction.all()) {\n\t\tif (filter.has(delegate.desc.id)) {\n\t\t\tmenuActions.push(new Action(delegate.desc.id, MenuItemAction.label(delegate.desc, { renderShortTitle: true }), undefined, true, async () => {\n\t\t\t\tconst ref = await resolverService.createModelReference(location.uri);\n\t\t\t\ttry {\n\t\t\t\t\tconst symbolAnchor = new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range));\n\t\t\t\t\tconst range = part.item.anchor.range;\n\t\t\t\t\tawait instaService.invokeFunction(delegate.runEditorCommand.bind(delegate), editor, symbolAnchor, range);\n\t\t\t\t} finally {\n\t\t\t\t\tref.dispose();\n\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\n\tif (part.part.command) {\n\t\tconst { command } = part.part;\n\t\tmenuActions.push(new Separator());\n\t\tmenuActions.push(new Action(command.id, command.title, undefined, true, async () => {\n\t\t\ttry {\n\t\t\t\tawait commandService.executeCommand(command.id, ...(command.arguments ?? []));\n\t\t\t} catch (err) {\n\t\t\t\tnotificationService.notify({\n\t\t\t\t\tseverity: Severity.Error,\n\t\t\t\t\tsource: part.item.provider.displayName,\n\t\t\t\t\tmessage: err\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\t}\n\n\t// show context menu\n\tconst useShadowDOM = editor.getOption(EditorOption.useShadowDOM);\n\tcontextMenuService.showContextMenu({\n\t\tdomForShadowRoot: useShadowDOM ? editor.getDomNode() ?? undefined : undefined,\n\t\tgetAnchor: () => {\n\t\t\tconst box = dom.getDomNodePagePosition(anchor);\n\t\t\treturn { x: box.left, y: box.top + box.height + 8 };\n\t\t},\n\t\tgetActions: () => menuActions,\n\t\tonHide: () => {\n\t\t\teditor.focus();\n\t\t},\n\t\tautoSelectFirstItem: true,\n\t});\n\n}\n\nexport async function goToDefinitionWithLocation(accessor: ServicesAccessor, event: ClickLinkMouseEvent, editor: IActiveCodeEditor, location: Location) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst ref = await resolverService.createModelReference(location.uri);\n\n\tawait editor.invokeWithinContext(async (accessor) => {\n\n\t\tconst openToSide = event.hasSideBySideModifier;\n\t\tconst contextKeyService = accessor.get(IContextKeyService);\n\n\t\tconst isInPeek = PeekContext.inPeekEditor.getValue(contextKeyService);\n\t\tconst canPeek = !openToSide && editor.getOption(EditorOption.definitionLinkOpensInPeek) && !isInPeek;\n\n\t\tconst action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });\n\t\treturn action.run(accessor, new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range)), Range.lift(location.range));\n\t});\n\n\tref.dispose();\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 dom from '../../../../base/browser/dom.js';\nimport { Action, IAction, Separator } from '../../../../base/common/actions.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { generateUuid } from '../../../../base/common/uuid.js';\nimport { IActiveCodeEditor, ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Location } from '../../../common/languages.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { DefinitionAction, SymbolNavigationAction, SymbolNavigationAnchor } from '../../gotoSymbol/browser/goToCommands.js';\nimport { ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { RenderedInlayHintLabelPart } from './inlayHintsController.js';\nimport { PeekContext } from '../../peekView/browser/peekView.js';\nimport { isIMenuItem, MenuId, MenuItemAction, MenuRegistry } from '../../../../platform/actions/common/actions.js';\nimport { ICommandService } from '../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';\nimport { INotificationService, Severity } from '../../../../platform/notification/common/notification.js';\n\nexport async function showGoToContextMenu(accessor: ServicesAccessor, editor: ICodeEditor, anchor: HTMLElement, part: RenderedInlayHintLabelPart) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst contextMenuService = accessor.get(IContextMenuService);\n\tconst commandService = accessor.get(ICommandService);\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst notificationService = accessor.get(INotificationService);\n\n\tawait part.item.resolve(CancellationToken.None);\n\n\tif (!part.part.location) {\n\t\treturn;\n\t}\n\n\tconst location: Location = part.part.location;\n\tconst menuActions: IAction[] = [];\n\n\t// from all registered (not active) context menu actions select those\n\t// that are a symbol navigation actions\n\tconst filter = new Set(MenuRegistry.getMenuItems(MenuId.EditorContext)\n\t\t.map(item => isIMenuItem(item) ? item.command.id : generateUuid()));\n\n\tfor (const delegate of SymbolNavigationAction.all()) {\n\t\tif (filter.has(delegate.desc.id)) {\n\t\t\tmenuActions.push(new Action(delegate.desc.id, MenuItemAction.label(delegate.desc, { renderShortTitle: true }), undefined, true, async () => {\n\t\t\t\tconst ref = await resolverService.createModelReference(location.uri);\n\t\t\t\ttry {\n\t\t\t\t\tconst symbolAnchor = new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range));\n\t\t\t\t\tconst range = part.item.anchor.range;\n\t\t\t\t\tawait instaService.invokeFunction(delegate.runEditorCommand.bind(delegate), editor, symbolAnchor, range);\n\t\t\t\t} finally {\n\t\t\t\t\tref.dispose();\n\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\n\tif (part.part.command) {\n\t\tconst { command } = part.part;\n\t\tmenuActions.push(new Separator());\n\t\tmenuActions.push(new Action(command.id, command.title, undefined, true, async () => {\n\t\t\ttry {\n\t\t\t\tawait commandService.executeCommand(command.id, ...(command.arguments ?? []));\n\t\t\t} catch (err) {\n\t\t\t\tnotificationService.notify({\n\t\t\t\t\tseverity: Severity.Error,\n\t\t\t\t\tsource: part.item.provider.displayName,\n\t\t\t\t\tmessage: err\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\t}\n\n\t// show context menu\n\tconst useShadowDOM = editor.getOption(EditorOption.useShadowDOM);\n\tcontextMenuService.showContextMenu({\n\t\tdomForShadowRoot: useShadowDOM ? editor.getDomNode() ?? undefined : undefined,\n\t\tgetAnchor: () => {\n\t\t\tconst box = dom.getDomNodePagePosition(anchor);\n\t\t\treturn { x: box.left, y: box.top + box.height + 8 };\n\t\t},\n\t\tgetActions: () => menuActions,\n\t\tonHide: () => {\n\t\t\teditor.focus();\n\t\t},\n\t\tautoSelectFirstItem: true,\n\t});\n\n}\n\nexport async function goToDefinitionWithLocation(accessor: ServicesAccessor, event: ClickLinkMouseEvent, editor: IActiveCodeEditor, location: Location) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst ref = await resolverService.createModelReference(location.uri);\n\n\tawait editor.invokeWithinContext(async (accessor) => {\n\n\t\tconst openToSide = event.hasSideBySideModifier;\n\t\tconst contextKeyService = accessor.get(IContextKeyService);\n\n\t\tconst isInPeek = PeekContext.inPeekEditor.getValue(contextKeyService);\n\t\tconst canPeek = !openToSide && editor.getOption(EditorOption.definitionLinkOpensInPeek) && !isInPeek;\n\n\t\tconst action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });\n\t\treturn action.run(accessor, new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range)), Range.lift(location.range));\n\t});\n\n\tref.dispose();\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.ts","vs/editor/contrib/inlayHints/browser/inlayHintsLocations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,MAAM,EAAW,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAG5H,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OA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esContent":["/*---------------------------------------------------------------------------------------------\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 dom from '../../../../base/browser/dom.js';\nimport { Action, IAction, Separator } from '../../../../base/common/actions.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { generateUuid } from '../../../../base/common/uuid.js';\nimport { IActiveCodeEditor, ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Location } from '../../../common/languages.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { DefinitionAction, SymbolNavigationAction, SymbolNavigationAnchor } from '../../gotoSymbol/browser/goToCommands.js';\nimport { ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { RenderedInlayHintLabelPart } from './inlayHintsController.js';\nimport { PeekContext } from '../../peekView/browser/peekView.js';\nimport { isIMenuItem, MenuId, MenuItemAction, MenuRegistry } from '../../../../platform/actions/common/actions.js';\nimport { ICommandService } from '../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';\nimport { INotificationService, Severity } from '../../../../platform/notification/common/notification.js';\n\nexport async function showGoToContextMenu(accessor: ServicesAccessor, editor: ICodeEditor, anchor: HTMLElement, part: RenderedInlayHintLabelPart) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst contextMenuService = accessor.get(IContextMenuService);\n\tconst commandService = accessor.get(ICommandService);\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst notificationService = accessor.get(INotificationService);\n\n\tawait part.item.resolve(CancellationToken.None);\n\n\tif (!part.part.location) {\n\t\treturn;\n\t}\n\n\tconst location: Location = part.part.location;\n\tconst menuActions: IAction[] = [];\n\n\t// from all registered (not active) context menu actions select those\n\t// that are a symbol navigation actions\n\tconst filter = new Set(MenuRegistry.getMenuItems(MenuId.EditorContext)\n\t\t.map(item => isIMenuItem(item) ? item.command.id : generateUuid()));\n\n\tfor (const delegate of SymbolNavigationAction.all()) {\n\t\tif (filter.has(delegate.desc.id)) {\n\t\t\tmenuActions.push(new Action(delegate.desc.id, MenuItemAction.label(delegate.desc, { renderShortTitle: true }), undefined, true, async () => {\n\t\t\t\tconst ref = await resolverService.createModelReference(location.uri);\n\t\t\t\ttry {\n\t\t\t\t\tconst symbolAnchor = new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range));\n\t\t\t\t\tconst range = part.item.anchor.range;\n\t\t\t\t\tawait instaService.invokeFunction(delegate.runEditorCommand.bind(delegate), editor, symbolAnchor, range);\n\t\t\t\t} finally {\n\t\t\t\t\tref.dispose();\n\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\n\tif (part.part.command) {\n\t\tconst { command } = part.part;\n\t\tmenuActions.push(new Separator());\n\t\tmenuActions.push(new Action(command.id, command.title, undefined, true, async () => {\n\t\t\ttry {\n\t\t\t\tawait commandService.executeCommand(command.id, ...(command.arguments ?? []));\n\t\t\t} catch (err) {\n\t\t\t\tnotificationService.notify({\n\t\t\t\t\tseverity: Severity.Error,\n\t\t\t\t\tsource: part.item.provider.displayName,\n\t\t\t\t\tmessage: err\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\t}\n\n\t// show context menu\n\tconst useShadowDOM = editor.getOption(EditorOption.useShadowDOM);\n\tcontextMenuService.showContextMenu({\n\t\tdomForShadowRoot: useShadowDOM ? editor.getDomNode() ?? undefined : undefined,\n\t\tgetAnchor: () => {\n\t\t\tconst box = dom.getDomNodePagePosition(anchor);\n\t\t\treturn { x: box.left, y: box.top + box.height + 8 };\n\t\t},\n\t\tgetActions: () => menuActions,\n\t\tonHide: () => {\n\t\t\teditor.focus();\n\t\t},\n\t\tautoSelectItem: true,\n\t});\n\n}\n\nexport async function goToDefinitionWithLocation(accessor: ServicesAccessor, event: ClickLinkMouseEvent, editor: IActiveCodeEditor, location: Location) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst ref = await resolverService.createModelReference(location.uri);\n\n\tawait editor.invokeWithinContext(async (accessor) => {\n\n\t\tconst openToSide = event.hasSideBySideModifier;\n\t\tconst contextKeyService = accessor.get(IContextKeyService);\n\n\t\tconst isInPeek = PeekContext.inPeekEditor.getValue(contextKeyService);\n\t\tconst canPeek = !openToSide && editor.getOption(EditorOption.definitionLinkOpensInPeek) && !isInPeek;\n\n\t\tconst action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });\n\t\treturn action.run(accessor, new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range)), Range.lift(location.range));\n\t});\n\n\tref.dispose();\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 dom from '../../../../base/browser/dom.js';\nimport { Action, IAction, Separator } from '../../../../base/common/actions.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { generateUuid } from '../../../../base/common/uuid.js';\nimport { IActiveCodeEditor, ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorOption } from '../../../common/config/editorOptions.js';\nimport { Range } from '../../../common/core/range.js';\nimport { Location } from '../../../common/languages.js';\nimport { ITextModelService } from '../../../common/services/resolverService.js';\nimport { DefinitionAction, SymbolNavigationAction, SymbolNavigationAnchor } from '../../gotoSymbol/browser/goToCommands.js';\nimport { ClickLinkMouseEvent } from '../../gotoSymbol/browser/link/clickLinkGesture.js';\nimport { RenderedInlayHintLabelPart } from './inlayHintsController.js';\nimport { PeekContext } from '../../peekView/browser/peekView.js';\nimport { isIMenuItem, MenuId, MenuItemAction, MenuRegistry } from '../../../../platform/actions/common/actions.js';\nimport { ICommandService } from '../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js';\nimport { INotificationService, Severity } from '../../../../platform/notification/common/notification.js';\n\nexport async function showGoToContextMenu(accessor: ServicesAccessor, editor: ICodeEditor, anchor: HTMLElement, part: RenderedInlayHintLabelPart) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst contextMenuService = accessor.get(IContextMenuService);\n\tconst commandService = accessor.get(ICommandService);\n\tconst instaService = accessor.get(IInstantiationService);\n\tconst notificationService = accessor.get(INotificationService);\n\n\tawait part.item.resolve(CancellationToken.None);\n\n\tif (!part.part.location) {\n\t\treturn;\n\t}\n\n\tconst location: Location = part.part.location;\n\tconst menuActions: IAction[] = [];\n\n\t// from all registered (not active) context menu actions select those\n\t// that are a symbol navigation actions\n\tconst filter = new Set(MenuRegistry.getMenuItems(MenuId.EditorContext)\n\t\t.map(item => isIMenuItem(item) ? item.command.id : generateUuid()));\n\n\tfor (const delegate of SymbolNavigationAction.all()) {\n\t\tif (filter.has(delegate.desc.id)) {\n\t\t\tmenuActions.push(new Action(delegate.desc.id, MenuItemAction.label(delegate.desc, { renderShortTitle: true }), undefined, true, async () => {\n\t\t\t\tconst ref = await resolverService.createModelReference(location.uri);\n\t\t\t\ttry {\n\t\t\t\t\tconst symbolAnchor = new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range));\n\t\t\t\t\tconst range = part.item.anchor.range;\n\t\t\t\t\tawait instaService.invokeFunction(delegate.runEditorCommand.bind(delegate), editor, symbolAnchor, range);\n\t\t\t\t} finally {\n\t\t\t\t\tref.dispose();\n\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t}\n\n\tif (part.part.command) {\n\t\tconst { command } = part.part;\n\t\tmenuActions.push(new Separator());\n\t\tmenuActions.push(new Action(command.id, command.title, undefined, true, async () => {\n\t\t\ttry {\n\t\t\t\tawait commandService.executeCommand(command.id, ...(command.arguments ?? []));\n\t\t\t} catch (err) {\n\t\t\t\tnotificationService.notify({\n\t\t\t\t\tseverity: Severity.Error,\n\t\t\t\t\tsource: part.item.provider.displayName,\n\t\t\t\t\tmessage: err\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\t}\n\n\t// show context menu\n\tconst useShadowDOM = editor.getOption(EditorOption.useShadowDOM);\n\tcontextMenuService.showContextMenu({\n\t\tdomForShadowRoot: useShadowDOM ? editor.getDomNode() ?? undefined : undefined,\n\t\tgetAnchor: () => {\n\t\t\tconst box = dom.getDomNodePagePosition(anchor);\n\t\t\treturn { x: box.left, y: box.top + box.height + 8 };\n\t\t},\n\t\tgetActions: () => menuActions,\n\t\tonHide: () => {\n\t\t\teditor.focus();\n\t\t},\n\t\tautoSelectItem: true,\n\t});\n\n}\n\nexport async function goToDefinitionWithLocation(accessor: ServicesAccessor, event: ClickLinkMouseEvent, editor: IActiveCodeEditor, location: Location) {\n\n\tconst resolverService = accessor.get(ITextModelService);\n\tconst ref = await resolverService.createModelReference(location.uri);\n\n\tawait editor.invokeWithinContext(async (accessor) => {\n\n\t\tconst openToSide = event.hasSideBySideModifier;\n\t\tconst contextKeyService = accessor.get(IContextKeyService);\n\n\t\tconst isInPeek = PeekContext.inPeekEditor.getValue(contextKeyService);\n\t\tconst canPeek = !openToSide && editor.getOption(EditorOption.definitionLinkOpensInPeek) && !isInPeek;\n\n\t\tconst action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined });\n\t\treturn action.run(accessor, new SymbolNavigationAnchor(ref.object.textEditorModel, Range.getStartPosition(location.range)), Range.lift(location.range));\n\t});\n\n\tref.dispose();\n}\n"]}
|
|
@@ -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(1246, "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(1247, "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(1248, "Trigger Inline Suggestion"),
|
|
79
79
|
precondition: EditorContextKeys.writable,
|
|
80
80
|
metadata: {
|
|
81
|
-
description: nls.localize(
|
|
81
|
+
description: nls.localize(1235, "Triggers an inline suggestion in the editor."),
|
|
82
82
|
args: [{
|
|
83
83
|
name: 'args',
|
|
84
|
-
description: nls.localize(
|
|
84
|
+
description: nls.localize(1236, "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(1237, "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(1249, "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(1238, '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(1250, "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(1239, '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(1251, "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(1240, "Accept"),
|
|
174
174
|
group: 'primary',
|
|
175
175
|
order: 2,
|
|
176
176
|
}, {
|
|
177
177
|
menuId: MenuId.InlineEditsActions,
|
|
178
|
-
title: nls.localize(
|
|
178
|
+
title: nls.localize(1241, "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(1252, "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(1253, "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(1242, "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(1254, "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(1243, "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(1255, "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(1244, "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(1245, "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(1256, "Whether an inline suggestion is visible")); }
|
|
10
|
+
static { this.inlineSuggestionAlternativeActionVisible = new RawContextKey('inlineSuggestionAlternativeActionVisible', false, localize(1257, "Whether an alternative action for the inline suggestion is visible.")); }
|
|
11
|
+
static { this.inlineSuggestionHasIndentation = new RawContextKey('inlineSuggestionHasIndentation', false, localize(1258, "Whether the inline suggestion starts with whitespace")); }
|
|
12
|
+
static { this.inlineSuggestionHasIndentationLessThanTabSize = new RawContextKey('inlineSuggestionHasIndentationLessThanTabSize', true, localize(1259, "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(1260, "Whether suggestions should be suppressed for the current suggestion")); }
|
|
14
|
+
static { this.cursorBeforeGhostText = new RawContextKey('cursorBeforeGhostText', false, localize(1261, "Whether the cursor is at ghost text")); }
|
|
15
|
+
static { this.cursorInIndentation = new RawContextKey('cursorInIndentation', false, localize(1262, "Whether the cursor is in indentation")); }
|
|
16
|
+
static { this.hasSelection = new RawContextKey('editor.hasSelection', false, localize(1263, "Whether the editor has a selection")); }
|
|
17
|
+
static { this.cursorAtInlineEdit = new RawContextKey('cursorAtInlineEdit', false, localize(1264, "Whether the cursor is at an inline edit")); }
|
|
18
|
+
static { this.inlineEditVisible = new RawContextKey('inlineEditIsVisible', false, localize(1265, "Whether an inline edit is visible")); }
|
|
19
|
+
static { this.tabShouldJumpToInlineEdit = new RawContextKey('tabShouldJumpToInlineEdit', false, localize(1266, "Whether tab should jump to an inline edit.")); }
|
|
20
|
+
static { this.tabShouldAcceptInlineEdit = new RawContextKey('tabShouldAcceptInlineEdit', false, localize(1267, "Whether tab should accept the inline edit.")); }
|
|
21
|
+
static { this.inInlineEditsPreviewEditor = new RawContextKey('inInlineEditsPreviewEditor', true, nls.localize(1268, "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(1269, "Next edit suggestion available on line {0}, press {1} to accept", lineNumber, kb)
|
|
324
|
+
: localize(1270, "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(1271, "Next edit suggestion available on line {0}, press {1} to jump", lineNumber, kb)
|
|
330
|
+
: localize(1272, "Next edit suggestion available on line {0}", lineNumber);
|
|
331
331
|
}
|
|
332
332
|
else {
|
|
333
|
-
content = localize(
|
|
333
|
+
content = localize(1273, "Next edit suggestion available on line {0}", lineNumber);
|
|
334
334
|
}
|
|
335
335
|
this._provideScreenReaderUpdate(content);
|
|
336
336
|
}
|
|
@@ -401,8 +401,8 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
401
401
|
const accessibleViewShowing = this._contextKeyService.getContextKeyValue('accessibleViewIsShown');
|
|
402
402
|
const accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView');
|
|
403
403
|
let hint;
|
|
404
|
-
if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(
|
|
405
|
-
hint = localize(
|
|
404
|
+
if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(173 /* EditorOption.inlineCompletionsAccessibilityVerbose */)) {
|
|
405
|
+
hint = localize(1274, "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(1275, '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(1276, "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
|
@@ -36,6 +36,7 @@ import { IInstantiationService } from '../../../../../platform/instantiation/com
|
|
|
36
36
|
import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';
|
|
37
37
|
import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js';
|
|
38
38
|
import { registerIcon } from '../../../../../platform/theme/common/iconRegistry.js';
|
|
39
|
+
import { getEditorMarkdownSanitizerConfig } from '../../../../browser/editorMarkdownSanitizer.js';
|
|
39
40
|
import { Position } from '../../../../common/core/position.js';
|
|
40
41
|
import { InlineCompletionTriggerKind } from '../../../../common/languages.js';
|
|
41
42
|
import { showNextInlineSuggestionActionId, showPreviousInlineSuggestionActionId } from '../controller/commandIds.js';
|
|
@@ -97,8 +98,8 @@ InlineCompletionsHintsWidget = __decorate([
|
|
|
97
98
|
__param(2, IInstantiationService)
|
|
98
99
|
], InlineCompletionsHintsWidget);
|
|
99
100
|
export { InlineCompletionsHintsWidget };
|
|
100
|
-
const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize(
|
|
101
|
-
const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize(
|
|
101
|
+
const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize(1277, 'Icon for show next parameter hint.'));
|
|
102
|
+
const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize(1278, 'Icon for show previous parameter hint.'));
|
|
102
103
|
let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidget extends Disposable {
|
|
103
104
|
static { InlineSuggestionHintsContentWidget_1 = this; }
|
|
104
105
|
static { this.hot = createHotClass(this); }
|
|
@@ -135,7 +136,7 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
|
|
|
135
136
|
if (typeof warning.message === 'string') {
|
|
136
137
|
return warning.message;
|
|
137
138
|
}
|
|
138
|
-
const markdownElement = reader.store.add(renderMarkdown(warning.message));
|
|
139
|
+
const markdownElement = reader.store.add(renderMarkdown(warning.message, { sanitizerConfig: getEditorMarkdownSanitizerConfig(this.editor) }));
|
|
139
140
|
return markdownElement.element;
|
|
140
141
|
});
|
|
141
142
|
this._warningMessageNode = n.div({
|
|
@@ -153,9 +154,9 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
|
|
|
153
154
|
this._warningMessageNode.element,
|
|
154
155
|
h('div@toolBar'),
|
|
155
156
|
]);
|
|
156
|
-
this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, localize(
|
|
157
|
+
this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, localize(1279, 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)));
|
|
157
158
|
this.availableSuggestionCountAction = this._register(new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false));
|
|
158
|
-
this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, localize(
|
|
159
|
+
this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, localize(1280, 'Next'), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)));
|
|
159
160
|
this.inlineCompletionsActionsMenus = this._register(this._menuService.createMenu(MenuId.InlineCompletionsActions, this._contextKeyService));
|
|
160
161
|
this.clearAvailableSuggestionCountLabelDebounced = this._register(new RunOnceScheduler(() => {
|
|
161
162
|
this.availableSuggestionCountAction.label = '';
|