monaco-editor-core 0.54.0-dev-20250922 → 0.54.0-dev-20250924

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.
Files changed (174) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.de.js +2 -2
  3. package/esm/nls.messages.es.js +2 -2
  4. package/esm/nls.messages.fr.js +2 -2
  5. package/esm/nls.messages.it.js +2 -2
  6. package/esm/nls.messages.ja.js +2 -2
  7. package/esm/nls.messages.js +1 -1
  8. package/esm/nls.messages.json +1 -1
  9. package/esm/nls.messages.ko.js +2 -2
  10. package/esm/nls.messages.ru.js +2 -2
  11. package/esm/nls.messages.zh-cn.js +2 -2
  12. package/esm/nls.messages.zh-tw.js +2 -2
  13. package/esm/nls.metadata.json +2 -0
  14. package/esm/vs/base/browser/ui/toolbar/toolbar.js +7 -0
  15. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  16. package/esm/vs/base/common/htmlContent.js +8 -0
  17. package/esm/vs/base/common/htmlContent.js.map +1 -1
  18. package/esm/vs/editor/common/config/editorOptions.js +274 -267
  19. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  20. package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
  21. package/esm/vs/editor/common/editorContextKeys.js +46 -46
  22. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  23. package/esm/vs/editor/common/languages.js +56 -56
  24. package/esm/vs/editor/common/model/editStack.js +1 -1
  25. package/esm/vs/editor/common/standaloneStrings.js +10 -10
  26. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  27. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  28. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  29. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  30. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  31. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  32. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  33. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  34. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  35. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  36. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  37. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  38. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  39. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  40. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  41. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  42. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  43. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  44. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  45. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  46. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  47. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  48. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  49. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  50. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  51. package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
  52. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  53. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +10 -0
  54. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +28 -5
  55. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js.map +1 -1
  56. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  57. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  58. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  59. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  60. package/esm/vs/editor/contrib/format/browser/format.js +3 -0
  61. package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
  62. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  63. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  64. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  65. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  66. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  67. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  68. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  69. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  70. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  71. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  72. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  73. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  74. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  75. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  76. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  77. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  78. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  79. package/esm/vs/editor/contrib/inlayHints/browser/inlayHints.js +2 -7
  80. package/esm/vs/editor/contrib/inlayHints/browser/inlayHints.js.map +1 -1
  81. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  82. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +19 -19
  83. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  84. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
  85. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
  86. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  87. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +6 -0
  88. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  89. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +5 -5
  90. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  91. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  92. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  93. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  94. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
  95. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  96. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  97. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  98. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  99. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  100. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  101. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  102. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  103. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
  104. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  105. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  106. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  107. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  108. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  109. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +12 -4
  110. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js.map +1 -1
  111. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  112. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  113. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  114. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  115. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  116. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  117. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  118. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  119. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  120. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  121. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  122. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  123. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +26 -26
  124. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  125. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  126. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  127. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  128. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  129. package/esm/vs/editor/editor.api.d.ts +1 -0
  130. package/esm/vs/editor/standalone/browser/standaloneThemeService.js +10 -0
  131. package/esm/vs/editor/standalone/browser/standaloneThemeService.js.map +1 -1
  132. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  133. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  134. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  135. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  136. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  137. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  138. package/esm/vs/platform/actions/common/menuService.js +2 -2
  139. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  140. package/esm/vs/platform/contextkey/browser/contextKeyService.js +37 -3
  141. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  142. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  143. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  144. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  145. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  146. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  147. package/esm/vs/platform/list/browser/listService.js +27 -27
  148. package/esm/vs/platform/markers/common/markerService.js +2 -2
  149. package/esm/vs/platform/markers/common/markers.js +6 -6
  150. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
  151. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  152. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  153. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  154. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  155. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  156. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  157. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  158. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  159. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  160. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  161. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  162. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  163. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  164. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  165. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  166. package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
  167. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  168. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  169. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  170. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  171. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  172. package/monaco.d.ts +1 -0
  173. package/package.json +2 -2
  174. package/version.txt +1 -1
@@ -24,6 +24,7 @@ import { localize } from '../../../../nls.js';
24
24
  import { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
25
25
  import { ILogService } from '../../../../platform/log/common/log.js';
26
26
  import { SnippetSession } from './snippetSession.js';
27
+ import { observableValue } from '../../../../base/common/observable.js';
27
28
  const _defaultOptions = {
28
29
  overwriteBefore: 0,
29
30
  overwriteAfter: 0,
@@ -39,14 +40,15 @@ let SnippetController2 = class SnippetController2 {
39
40
  static get(editor) {
40
41
  return editor.getContribution(SnippetController2_1.ID);
41
42
  }
42
- static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1385, "Whether the editor in current in snippet mode")); }
43
- static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1386, "Whether there is a next tab stop when in snippet mode")); }
44
- static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1387, "Whether there is a previous tab stop when in snippet mode")); }
43
+ static { this.InSnippetMode = new RawContextKey('inSnippetMode', false, localize(1386, "Whether the editor in current in snippet mode")); }
44
+ static { this.HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize(1387, "Whether there is a next tab stop when in snippet mode")); }
45
+ static { this.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize(1388, "Whether there is a previous tab stop when in snippet mode")); }
45
46
  constructor(_editor, _logService, _languageFeaturesService, contextKeyService, _languageConfigurationService) {
46
47
  this._editor = _editor;
47
48
  this._logService = _logService;
48
49
  this._languageFeaturesService = _languageFeaturesService;
49
50
  this._languageConfigurationService = _languageConfigurationService;
51
+ this._inSnippetObservable = observableValue(this, false);
50
52
  this._snippetListener = new DisposableStore();
51
53
  this._modelVersionId = -1;
52
54
  this._inSnippet = SnippetController2_1.InSnippetMode.bindTo(contextKeyService);
@@ -55,6 +57,7 @@ let SnippetController2 = class SnippetController2 {
55
57
  }
56
58
  dispose() {
57
59
  this._inSnippet.reset();
60
+ this._inSnippetObservable.set(false, undefined);
58
61
  this._hasPrevTabstop.reset();
59
62
  this._hasNextTabstop.reset();
60
63
  this._session?.dispose();
@@ -125,7 +128,7 @@ let SnippetController2 = class SnippetController2 {
125
128
  sortText: 'a'.repeat(i + 1),
126
129
  range: activeChoice.range,
127
130
  filterText: isAnyOfOptions ? `${word}_${option.value}` : undefined,
128
- command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1388, 'Go to next placeholder...') }
131
+ command: { id: 'jumpToNextSnippetPlaceholder', title: localize(1389, 'Go to next placeholder...') }
129
132
  });
130
133
  }
131
134
  return { suggestions };
@@ -177,6 +180,7 @@ let SnippetController2 = class SnippetController2 {
177
180
  return this.cancel();
178
181
  }
179
182
  this._inSnippet.set(true);
183
+ this._inSnippetObservable.set(true, undefined);
180
184
  this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder);
181
185
  this._hasNextTabstop.set(!this._session.isAtLastPlaceholder);
182
186
  this._handleChoice();
@@ -208,6 +212,7 @@ let SnippetController2 = class SnippetController2 {
208
212
  }
209
213
  cancel(resetSelection = false) {
210
214
  this._inSnippet.reset();
215
+ this._inSnippetObservable.set(false, undefined);
211
216
  this._hasPrevTabstop.reset();
212
217
  this._hasNextTabstop.reset();
213
218
  this._snippetListener.clear();
@@ -233,6 +238,9 @@ let SnippetController2 = class SnippetController2 {
233
238
  isInSnippet() {
234
239
  return Boolean(this._inSnippet.get());
235
240
  }
241
+ get isInSnippetObservable() {
242
+ return this._inSnippetObservable;
243
+ }
236
244
  };
237
245
  SnippetController2 = SnippetController2_1 = __decorate([
238
246
  __param(1, ILogService),
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/contrib/snippet/browser/snippetController2.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAGhG,OAAO,EAAE,eAAe,EAAe,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAmC,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AACzJ,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAE3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAe,kBAAkB,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAEtI,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAgB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAcnE,MAAM,eAAe,GAA0B;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3C,MAAM,EAAE,iBAAiB,CAAC,cAAc;QACxC,OAAO,qBAAa;KACpB;CACD,CAAC,CAAC,CAAC;AACJ,qBAAqB,CAAC,IAAI,WAAW,CAAC;IACrC,EAAE,EAAE,8BAA8B;IAClC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,kBAAkB,CAAC,aAAa,EAAE,kBAAkB,CAAC,cAAc,CAAC;IACrG,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE;IAC5B,MAAM,EAAE;QACP,MAAM,EAAE,2CAAiC,EAAE;QAC3C,MAAM,EAAE,iBAAiB,CAAC,cAAc;QACxC,OAAO,EAAE,6CAA0B;KACnC;CACD,CAAC,CAAC,CAAC;AACJ,qBAAqB,CAAC,IAAI,WAAW,CAAC;IACrC,EAAE,EAAE,cAAc;IAClB,YAAY,EAAE,kBAAkB,CAAC,aAAa;IAC9C,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAClC,MAAM,EAAE;QACP,MAAM,EAAE,2CAAiC,EAAE;QAC3C,MAAM,EAAE,iBAAiB,CAAC,cAAc;QACxC,OAAO,wBAAgB;QACvB,SAAS,EAAE,CAAC,gDAA6B,CAAC;KAC1C;CACD,CAAC,CAAC,CAAC;AAEJ,qBAAqB,CAAC,IAAI,WAAW,CAAC;IACrC,EAAE,EAAE,eAAe;IACnB,YAAY,EAAE,kBAAkB,CAAC,aAAa;IAC9C,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;IAC9B,YAAY;IACZ,gDAAgD;IAChD,wCAAwC;IACxC,2BAA2B;IAC3B,IAAI;CACJ,CAAC,CAAC,CAAC","file":"snippetController2.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 { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorCommand, EditorContributionInstantiation, registerEditorCommand, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { CompletionItem, CompletionItemKind, CompletionItemProvider } from '../../../common/languages.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { Choice } from './snippetParser.js';\nimport { showSimpleSuggestions } from '../../suggest/browser/suggest.js';\nimport { OvertypingCapturer } from '../../suggest/browser/suggestOvertypingCapturer.js';\nimport { localize } from '../../../../nls.js';\nimport { ContextKeyExpr, IContextKey, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { ISnippetEdit, SnippetSession } from './snippetSession.js';\nimport { TextModelEditSource } from '../../../common/textModelEditSource.js';\n\nexport interface ISnippetInsertOptions {\n\toverwriteBefore: number;\n\toverwriteAfter: number;\n\tadjustWhitespace: boolean;\n\tundoStopBefore: boolean;\n\tundoStopAfter: boolean;\n\tclipboardText: string | undefined;\n\tovertypingCapturer: OvertypingCapturer | undefined;\n\treason?: TextModelEditSource;\n}\n\nconst _defaultOptions: ISnippetInsertOptions = {\n\toverwriteBefore: 0,\n\toverwriteAfter: 0,\n\tundoStopBefore: true,\n\tundoStopAfter: true,\n\tadjustWhitespace: true,\n\tclipboardText: undefined,\n\tovertypingCapturer: undefined\n};\n\nexport class SnippetController2 implements IEditorContribution {\n\n\tpublic static readonly ID = 'snippetController2';\n\n\tstatic get(editor: ICodeEditor): SnippetController2 | null {\n\t\treturn editor.getContribution<SnippetController2>(SnippetController2.ID);\n\t}\n\n\tstatic readonly InSnippetMode = new RawContextKey('inSnippetMode', false, localize('inSnippetMode', \"Whether the editor in current in snippet mode\"));\n\tstatic readonly HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize('hasNextTabstop', \"Whether there is a next tab stop when in snippet mode\"));\n\tstatic readonly HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize('hasPrevTabstop', \"Whether there is a previous tab stop when in snippet mode\"));\n\n\tprivate readonly _inSnippet: IContextKey<boolean>;\n\tprivate readonly _hasNextTabstop: IContextKey<boolean>;\n\tprivate readonly _hasPrevTabstop: IContextKey<boolean>;\n\n\tprivate _session?: SnippetSession;\n\tprivate readonly _snippetListener = new DisposableStore();\n\tprivate _modelVersionId: number = -1;\n\tprivate _currentChoice?: Choice;\n\n\tprivate _choiceCompletions?: { provider: CompletionItemProvider; enable(): void; disable(): void };\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@ILogService private readonly _logService: ILogService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ILanguageConfigurationService private readonly _languageConfigurationService: ILanguageConfigurationService,\n\t) {\n\t\tthis._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService);\n\t\tthis._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService);\n\t\tthis._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService);\n\t}\n\n\tdispose(): void {\n\t\tthis._inSnippet.reset();\n\t\tthis._hasPrevTabstop.reset();\n\t\tthis._hasNextTabstop.reset();\n\t\tthis._session?.dispose();\n\t\tthis._snippetListener.dispose();\n\t}\n\n\tinsert(\n\t\ttemplate: string,\n\t\topts?: Partial<ISnippetInsertOptions>\n\t): void {\n\t\t// this is here to find out more about the yet-not-understood\n\t\t// error that sometimes happens when we fail to inserted a nested\n\t\t// snippet\n\t\ttry {\n\t\t\tthis._doInsert(template, typeof opts === 'undefined' ? _defaultOptions : { ..._defaultOptions, ...opts });\n\n\t\t} catch (e) {\n\t\t\tthis.cancel();\n\t\t\tthis._logService.error(e);\n\t\t\tthis._logService.error('snippet_error');\n\t\t\tthis._logService.error('insert_template=', template);\n\t\t\tthis._logService.error('existing_template=', this._session ? this._session._logInfo() : '<no_session>');\n\t\t}\n\t}\n\n\tprivate _doInsert(\n\t\ttemplate: string | ISnippetEdit[],\n\t\topts: ISnippetInsertOptions,\n\t): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// don't listen while inserting the snippet\n\t\t// as that is the inflight state causing cancelation\n\t\tthis._snippetListener.clear();\n\n\t\tif (opts.undoStopBefore) {\n\t\t\tthis._editor.getModel().pushStackElement();\n\t\t}\n\n\t\t// don't merge\n\t\tif (this._session && typeof template !== 'string') {\n\t\t\tthis.cancel();\n\t\t}\n\n\t\tif (!this._session) {\n\t\t\tthis._modelVersionId = this._editor.getModel().getAlternativeVersionId();\n\t\t\tthis._session = new SnippetSession(this._editor, template, opts, this._languageConfigurationService);\n\t\t\tthis._session.insert(opts.reason);\n\t\t} else {\n\t\t\tassertType(typeof template === 'string');\n\t\t\tthis._session.merge(template, opts);\n\t\t}\n\n\t\tif (opts.undoStopAfter) {\n\t\t\tthis._editor.getModel().pushStackElement();\n\t\t}\n\n\t\t// regster completion item provider when there is any choice element\n\t\tif (this._session?.hasChoice) {\n\t\t\tconst provider: CompletionItemProvider = {\n\t\t\t\t_debugDisplayName: 'snippetChoiceCompletions',\n\t\t\t\tprovideCompletionItems: (model: ITextModel, position: Position) => {\n\t\t\t\t\tif (!this._session || model !== this._editor.getModel() || !Position.equals(this._editor.getPosition(), position)) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst { activeChoice } = this._session;\n\t\t\t\t\tif (!activeChoice || activeChoice.choice.options.length === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst word = model.getValueInRange(activeChoice.range);\n\t\t\t\t\tconst isAnyOfOptions = Boolean(activeChoice.choice.options.find(o => o.value === word));\n\t\t\t\t\tconst suggestions: CompletionItem[] = [];\n\t\t\t\t\tfor (let i = 0; i < activeChoice.choice.options.length; i++) {\n\t\t\t\t\t\tconst option = activeChoice.choice.options[i];\n\t\t\t\t\t\tsuggestions.push({\n\t\t\t\t\t\t\tkind: CompletionItemKind.Value,\n\t\t\t\t\t\t\tlabel: option.value,\n\t\t\t\t\t\t\tinsertText: option.value,\n\t\t\t\t\t\t\tsortText: 'a'.repeat(i + 1),\n\t\t\t\t\t\t\trange: activeChoice.range,\n\t\t\t\t\t\t\tfilterText: isAnyOfOptions ? `${word}_${option.value}` : undefined,\n\t\t\t\t\t\t\tcommand: { id: 'jumpToNextSnippetPlaceholder', title: localize('next', 'Go to next placeholder...') }\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\treturn { suggestions };\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst model = this._editor.getModel();\n\n\t\t\tlet registration: IDisposable | undefined;\n\t\t\tlet isRegistered = false;\n\t\t\tconst disable = () => {\n\t\t\t\tregistration?.dispose();\n\t\t\t\tisRegistered = false;\n\t\t\t};\n\n\t\t\tconst enable = () => {\n\t\t\t\tif (!isRegistered) {\n\t\t\t\t\tregistration = this._languageFeaturesService.completionProvider.register({\n\t\t\t\t\t\tlanguage: model.getLanguageId(),\n\t\t\t\t\t\tpattern: model.uri.fsPath,\n\t\t\t\t\t\tscheme: model.uri.scheme,\n\t\t\t\t\t\texclusive: true\n\t\t\t\t\t}, provider);\n\t\t\t\t\tthis._snippetListener.add(registration);\n\t\t\t\t\tisRegistered = true;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._choiceCompletions = { provider, enable, disable };\n\t\t}\n\n\t\tthis._updateState();\n\n\t\tthis._snippetListener.add(this._editor.onDidChangeModelContent(e => e.isFlush && this.cancel()));\n\t\tthis._snippetListener.add(this._editor.onDidChangeModel(() => this.cancel()));\n\t\tthis._snippetListener.add(this._editor.onDidChangeCursorSelection(() => this._updateState()));\n\t}\n\n\tprivate _updateState(): void {\n\t\tif (!this._session || !this._editor.hasModel()) {\n\t\t\t// canceled in the meanwhile\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) {\n\t\t\t// undo until the 'before' state happened\n\t\t\t// and makes use cancel snippet mode\n\t\t\treturn this.cancel();\n\t\t}\n\n\t\tif (!this._session.hasPlaceholder) {\n\t\t\t// don't listen for selection changes and don't\n\t\t\t// update context keys when the snippet is plain text\n\t\t\treturn this.cancel();\n\t\t}\n\n\t\tif (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) {\n\t\t\tthis._editor.getModel().pushStackElement();\n\t\t\treturn this.cancel();\n\t\t}\n\n\t\tthis._inSnippet.set(true);\n\t\tthis._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder);\n\t\tthis._hasNextTabstop.set(!this._session.isAtLastPlaceholder);\n\n\t\tthis._handleChoice();\n\t}\n\n\tprivate _handleChoice(): void {\n\t\tif (!this._session || !this._editor.hasModel()) {\n\t\t\tthis._currentChoice = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst { activeChoice } = this._session;\n\t\tif (!activeChoice || !this._choiceCompletions) {\n\t\t\tthis._choiceCompletions?.disable();\n\t\t\tthis._currentChoice = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentChoice !== activeChoice.choice) {\n\t\t\tthis._currentChoice = activeChoice.choice;\n\n\t\t\tthis._choiceCompletions.enable();\n\n\t\t\t// trigger suggest with the special choice completion provider\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tshowSimpleSuggestions(this._editor, this._choiceCompletions!.provider);\n\t\t\t});\n\t\t}\n\t}\n\n\tfinish(): void {\n\t\twhile (this._inSnippet.get()) {\n\t\t\tthis.next();\n\t\t}\n\t}\n\n\tcancel(resetSelection: boolean = false): void {\n\t\tthis._inSnippet.reset();\n\t\tthis._hasPrevTabstop.reset();\n\t\tthis._hasNextTabstop.reset();\n\t\tthis._snippetListener.clear();\n\n\t\tthis._currentChoice = undefined;\n\n\t\tthis._session?.dispose();\n\t\tthis._session = undefined;\n\t\tthis._modelVersionId = -1;\n\t\tif (resetSelection) {\n\t\t\t// reset selection to the primary cursor when being asked\n\t\t\t// for. this happens when explicitly cancelling snippet mode,\n\t\t\t// e.g. when pressing ESC\n\t\t\tthis._editor.setSelections([this._editor.getSelection()!]);\n\t\t}\n\t}\n\n\tprev(): void {\n\t\tthis._session?.prev();\n\t\tthis._updateState();\n\t}\n\n\tnext(): void {\n\t\tthis._session?.next();\n\t\tthis._updateState();\n\t}\n\n\tisInSnippet(): boolean {\n\t\treturn Boolean(this._inSnippet.get());\n\t}\n}\n\n\nregisterEditorContribution(SnippetController2.ID, SnippetController2, EditorContributionInstantiation.Lazy);\n\nconst CommandCtor = EditorCommand.bindToContribution<SnippetController2>(SnippetController2.get);\n\nregisterEditorCommand(new CommandCtor({\n\tid: 'jumpToNextSnippetPlaceholder',\n\tprecondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop),\n\thandler: ctrl => ctrl.next(),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 30,\n\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\tprimary: KeyCode.Tab\n\t}\n}));\nregisterEditorCommand(new CommandCtor({\n\tid: 'jumpToPrevSnippetPlaceholder',\n\tprecondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop),\n\thandler: ctrl => ctrl.prev(),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 30,\n\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\tprimary: KeyMod.Shift | KeyCode.Tab\n\t}\n}));\nregisterEditorCommand(new CommandCtor({\n\tid: 'leaveSnippet',\n\tprecondition: SnippetController2.InSnippetMode,\n\thandler: ctrl => ctrl.cancel(true),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 30,\n\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\tprimary: KeyCode.Escape,\n\t\tsecondary: [KeyMod.Shift | KeyCode.Escape]\n\t}\n}));\n\nregisterEditorCommand(new CommandCtor({\n\tid: 'acceptSnippet',\n\tprecondition: SnippetController2.InSnippetMode,\n\thandler: ctrl => ctrl.finish(),\n\t// kbOpts: {\n\t// \tweight: KeybindingWeight.EditorContrib + 30,\n\t// \tkbExpr: EditorContextKeys.textFocus,\n\t// \tprimary: KeyCode.Enter,\n\t// }\n}));\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/snippet/browser/snippetController2.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAGhG,OAAO,EAAE,eAAe,EAAe,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAmC,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AACzJ,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAE3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAe,kBAAkB,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAEtI,OAAO,EAA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AAiB,CAAC,cAAc;QACxC,OAAO,wBAAgB;QACvB,SAAS,EAAE,CAAC,gDAA6B,CAAC;KAC1C;CACD,CAAC,CAAC,CAAC;AAEJ,qBAAqB,CAAC,IAAI,WAAW,CAAC;IACrC,EAAE,EAAE,eAAe;IACnB,YAAY,EAAE,kBAAkB,CAAC,aAAa;IAC9C,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;IAC9B,YAAY;IACZ,gDAAgD;IAChD,wCAAwC;IACxC,2BAA2B;IAC3B,IAAI;CACJ,CAAC,CAAC,CAAC","file":"snippetController2.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 { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { assertType } from '../../../../base/common/types.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { EditorCommand, EditorContributionInstantiation, registerEditorCommand, registerEditorContribution } from '../../../browser/editorExtensions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { IEditorContribution } from '../../../common/editorCommon.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { CompletionItem, CompletionItemKind, CompletionItemProvider } from '../../../common/languages.js';\nimport { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';\nimport { ITextModel } from '../../../common/model.js';\nimport { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js';\nimport { Choice } from './snippetParser.js';\nimport { showSimpleSuggestions } from '../../suggest/browser/suggest.js';\nimport { OvertypingCapturer } from '../../suggest/browser/suggestOvertypingCapturer.js';\nimport { localize } from '../../../../nls.js';\nimport { ContextKeyExpr, IContextKey, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { ILogService } from '../../../../platform/log/common/log.js';\nimport { ISnippetEdit, SnippetSession } from './snippetSession.js';\nimport { TextModelEditSource } from '../../../common/textModelEditSource.js';\nimport { IObservable, observableValue } from '../../../../base/common/observable.js';\n\nexport interface ISnippetInsertOptions {\n\toverwriteBefore: number;\n\toverwriteAfter: number;\n\tadjustWhitespace: boolean;\n\tundoStopBefore: boolean;\n\tundoStopAfter: boolean;\n\tclipboardText: string | undefined;\n\tovertypingCapturer: OvertypingCapturer | undefined;\n\treason?: TextModelEditSource;\n}\n\nconst _defaultOptions: ISnippetInsertOptions = {\n\toverwriteBefore: 0,\n\toverwriteAfter: 0,\n\tundoStopBefore: true,\n\tundoStopAfter: true,\n\tadjustWhitespace: true,\n\tclipboardText: undefined,\n\tovertypingCapturer: undefined\n};\n\nexport class SnippetController2 implements IEditorContribution {\n\n\tpublic static readonly ID = 'snippetController2';\n\n\tstatic get(editor: ICodeEditor): SnippetController2 | null {\n\t\treturn editor.getContribution<SnippetController2>(SnippetController2.ID);\n\t}\n\n\tstatic readonly InSnippetMode = new RawContextKey('inSnippetMode', false, localize('inSnippetMode', \"Whether the editor in current in snippet mode\"));\n\tstatic readonly HasNextTabstop = new RawContextKey('hasNextTabstop', false, localize('hasNextTabstop', \"Whether there is a next tab stop when in snippet mode\"));\n\tstatic readonly HasPrevTabstop = new RawContextKey('hasPrevTabstop', false, localize('hasPrevTabstop', \"Whether there is a previous tab stop when in snippet mode\"));\n\n\tprivate readonly _inSnippet: IContextKey<boolean>;\n\tprivate readonly _inSnippetObservable = observableValue(this, false);\n\tprivate readonly _hasNextTabstop: IContextKey<boolean>;\n\tprivate readonly _hasPrevTabstop: IContextKey<boolean>;\n\n\tprivate _session?: SnippetSession;\n\tprivate readonly _snippetListener = new DisposableStore();\n\tprivate _modelVersionId: number = -1;\n\tprivate _currentChoice?: Choice;\n\n\tprivate _choiceCompletions?: { provider: CompletionItemProvider; enable(): void; disable(): void };\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\t@ILogService private readonly _logService: ILogService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IContextKeyService contextKeyService: IContextKeyService,\n\t\t@ILanguageConfigurationService private readonly _languageConfigurationService: ILanguageConfigurationService,\n\t) {\n\t\tthis._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService);\n\t\tthis._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService);\n\t\tthis._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService);\n\t}\n\n\tdispose(): void {\n\t\tthis._inSnippet.reset();\n\t\tthis._inSnippetObservable.set(false, undefined);\n\t\tthis._hasPrevTabstop.reset();\n\t\tthis._hasNextTabstop.reset();\n\t\tthis._session?.dispose();\n\t\tthis._snippetListener.dispose();\n\t}\n\n\tinsert(\n\t\ttemplate: string,\n\t\topts?: Partial<ISnippetInsertOptions>\n\t): void {\n\t\t// this is here to find out more about the yet-not-understood\n\t\t// error that sometimes happens when we fail to inserted a nested\n\t\t// snippet\n\t\ttry {\n\t\t\tthis._doInsert(template, typeof opts === 'undefined' ? _defaultOptions : { ..._defaultOptions, ...opts });\n\n\t\t} catch (e) {\n\t\t\tthis.cancel();\n\t\t\tthis._logService.error(e);\n\t\t\tthis._logService.error('snippet_error');\n\t\t\tthis._logService.error('insert_template=', template);\n\t\t\tthis._logService.error('existing_template=', this._session ? this._session._logInfo() : '<no_session>');\n\t\t}\n\t}\n\n\tprivate _doInsert(\n\t\ttemplate: string | ISnippetEdit[],\n\t\topts: ISnippetInsertOptions,\n\t): void {\n\t\tif (!this._editor.hasModel()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// don't listen while inserting the snippet\n\t\t// as that is the inflight state causing cancelation\n\t\tthis._snippetListener.clear();\n\n\t\tif (opts.undoStopBefore) {\n\t\t\tthis._editor.getModel().pushStackElement();\n\t\t}\n\n\t\t// don't merge\n\t\tif (this._session && typeof template !== 'string') {\n\t\t\tthis.cancel();\n\t\t}\n\n\t\tif (!this._session) {\n\t\t\tthis._modelVersionId = this._editor.getModel().getAlternativeVersionId();\n\t\t\tthis._session = new SnippetSession(this._editor, template, opts, this._languageConfigurationService);\n\t\t\tthis._session.insert(opts.reason);\n\t\t} else {\n\t\t\tassertType(typeof template === 'string');\n\t\t\tthis._session.merge(template, opts);\n\t\t}\n\n\t\tif (opts.undoStopAfter) {\n\t\t\tthis._editor.getModel().pushStackElement();\n\t\t}\n\n\t\t// regster completion item provider when there is any choice element\n\t\tif (this._session?.hasChoice) {\n\t\t\tconst provider: CompletionItemProvider = {\n\t\t\t\t_debugDisplayName: 'snippetChoiceCompletions',\n\t\t\t\tprovideCompletionItems: (model: ITextModel, position: Position) => {\n\t\t\t\t\tif (!this._session || model !== this._editor.getModel() || !Position.equals(this._editor.getPosition(), position)) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst { activeChoice } = this._session;\n\t\t\t\t\tif (!activeChoice || activeChoice.choice.options.length === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst word = model.getValueInRange(activeChoice.range);\n\t\t\t\t\tconst isAnyOfOptions = Boolean(activeChoice.choice.options.find(o => o.value === word));\n\t\t\t\t\tconst suggestions: CompletionItem[] = [];\n\t\t\t\t\tfor (let i = 0; i < activeChoice.choice.options.length; i++) {\n\t\t\t\t\t\tconst option = activeChoice.choice.options[i];\n\t\t\t\t\t\tsuggestions.push({\n\t\t\t\t\t\t\tkind: CompletionItemKind.Value,\n\t\t\t\t\t\t\tlabel: option.value,\n\t\t\t\t\t\t\tinsertText: option.value,\n\t\t\t\t\t\t\tsortText: 'a'.repeat(i + 1),\n\t\t\t\t\t\t\trange: activeChoice.range,\n\t\t\t\t\t\t\tfilterText: isAnyOfOptions ? `${word}_${option.value}` : undefined,\n\t\t\t\t\t\t\tcommand: { id: 'jumpToNextSnippetPlaceholder', title: localize('next', 'Go to next placeholder...') }\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\treturn { suggestions };\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst model = this._editor.getModel();\n\n\t\t\tlet registration: IDisposable | undefined;\n\t\t\tlet isRegistered = false;\n\t\t\tconst disable = () => {\n\t\t\t\tregistration?.dispose();\n\t\t\t\tisRegistered = false;\n\t\t\t};\n\n\t\t\tconst enable = () => {\n\t\t\t\tif (!isRegistered) {\n\t\t\t\t\tregistration = this._languageFeaturesService.completionProvider.register({\n\t\t\t\t\t\tlanguage: model.getLanguageId(),\n\t\t\t\t\t\tpattern: model.uri.fsPath,\n\t\t\t\t\t\tscheme: model.uri.scheme,\n\t\t\t\t\t\texclusive: true\n\t\t\t\t\t}, provider);\n\t\t\t\t\tthis._snippetListener.add(registration);\n\t\t\t\t\tisRegistered = true;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis._choiceCompletions = { provider, enable, disable };\n\t\t}\n\n\t\tthis._updateState();\n\n\t\tthis._snippetListener.add(this._editor.onDidChangeModelContent(e => e.isFlush && this.cancel()));\n\t\tthis._snippetListener.add(this._editor.onDidChangeModel(() => this.cancel()));\n\t\tthis._snippetListener.add(this._editor.onDidChangeCursorSelection(() => this._updateState()));\n\t}\n\n\tprivate _updateState(): void {\n\t\tif (!this._session || !this._editor.hasModel()) {\n\t\t\t// canceled in the meanwhile\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) {\n\t\t\t// undo until the 'before' state happened\n\t\t\t// and makes use cancel snippet mode\n\t\t\treturn this.cancel();\n\t\t}\n\n\t\tif (!this._session.hasPlaceholder) {\n\t\t\t// don't listen for selection changes and don't\n\t\t\t// update context keys when the snippet is plain text\n\t\t\treturn this.cancel();\n\t\t}\n\n\t\tif (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) {\n\t\t\tthis._editor.getModel().pushStackElement();\n\t\t\treturn this.cancel();\n\t\t}\n\n\t\tthis._inSnippet.set(true);\n\t\tthis._inSnippetObservable.set(true, undefined);\n\t\tthis._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder);\n\t\tthis._hasNextTabstop.set(!this._session.isAtLastPlaceholder);\n\n\t\tthis._handleChoice();\n\t}\n\n\tprivate _handleChoice(): void {\n\t\tif (!this._session || !this._editor.hasModel()) {\n\t\t\tthis._currentChoice = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst { activeChoice } = this._session;\n\t\tif (!activeChoice || !this._choiceCompletions) {\n\t\t\tthis._choiceCompletions?.disable();\n\t\t\tthis._currentChoice = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentChoice !== activeChoice.choice) {\n\t\t\tthis._currentChoice = activeChoice.choice;\n\n\t\t\tthis._choiceCompletions.enable();\n\n\t\t\t// trigger suggest with the special choice completion provider\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tshowSimpleSuggestions(this._editor, this._choiceCompletions!.provider);\n\t\t\t});\n\t\t}\n\t}\n\n\tfinish(): void {\n\t\twhile (this._inSnippet.get()) {\n\t\t\tthis.next();\n\t\t}\n\t}\n\n\tcancel(resetSelection: boolean = false): void {\n\t\tthis._inSnippet.reset();\n\t\tthis._inSnippetObservable.set(false, undefined);\n\t\tthis._hasPrevTabstop.reset();\n\t\tthis._hasNextTabstop.reset();\n\t\tthis._snippetListener.clear();\n\n\t\tthis._currentChoice = undefined;\n\n\t\tthis._session?.dispose();\n\t\tthis._session = undefined;\n\t\tthis._modelVersionId = -1;\n\t\tif (resetSelection) {\n\t\t\t// reset selection to the primary cursor when being asked\n\t\t\t// for. this happens when explicitly cancelling snippet mode,\n\t\t\t// e.g. when pressing ESC\n\t\t\tthis._editor.setSelections([this._editor.getSelection()!]);\n\t\t}\n\t}\n\n\tprev(): void {\n\t\tthis._session?.prev();\n\t\tthis._updateState();\n\t}\n\n\tnext(): void {\n\t\tthis._session?.next();\n\t\tthis._updateState();\n\t}\n\n\tisInSnippet(): boolean {\n\t\treturn Boolean(this._inSnippet.get());\n\t}\n\n\tget isInSnippetObservable(): IObservable<boolean> {\n\t\treturn this._inSnippetObservable;\n\t}\n}\n\n\nregisterEditorContribution(SnippetController2.ID, SnippetController2, EditorContributionInstantiation.Lazy);\n\nconst CommandCtor = EditorCommand.bindToContribution<SnippetController2>(SnippetController2.get);\n\nregisterEditorCommand(new CommandCtor({\n\tid: 'jumpToNextSnippetPlaceholder',\n\tprecondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop),\n\thandler: ctrl => ctrl.next(),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 30,\n\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\tprimary: KeyCode.Tab\n\t}\n}));\nregisterEditorCommand(new CommandCtor({\n\tid: 'jumpToPrevSnippetPlaceholder',\n\tprecondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop),\n\thandler: ctrl => ctrl.prev(),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 30,\n\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\tprimary: KeyMod.Shift | KeyCode.Tab\n\t}\n}));\nregisterEditorCommand(new CommandCtor({\n\tid: 'leaveSnippet',\n\tprecondition: SnippetController2.InSnippetMode,\n\thandler: ctrl => ctrl.cancel(true),\n\tkbOpts: {\n\t\tweight: KeybindingWeight.EditorContrib + 30,\n\t\tkbExpr: EditorContextKeys.textInputFocus,\n\t\tprimary: KeyCode.Escape,\n\t\tsecondary: [KeyMod.Shift | KeyCode.Escape]\n\t}\n}));\n\nregisterEditorCommand(new CommandCtor({\n\tid: 'acceptSnippet',\n\tprecondition: SnippetController2.InSnippetMode,\n\thandler: ctrl => ctrl.finish(),\n\t// kbOpts: {\n\t// \tweight: KeybindingWeight.EditorContrib + 30,\n\t// \tkbExpr: EditorContextKeys.textFocus,\n\t// \tprimary: KeyCode.Enter,\n\t// }\n}));\n"]}
@@ -238,10 +238,10 @@ export class TimeBasedVariableResolver {
238
238
  constructor() {
239
239
  this._date = new Date();
240
240
  }
241
- static { this.dayNames = [nls.localize(1389, "Sunday"), nls.localize(1390, "Monday"), nls.localize(1391, "Tuesday"), nls.localize(1392, "Wednesday"), nls.localize(1393, "Thursday"), nls.localize(1394, "Friday"), nls.localize(1395, "Saturday")]; }
242
- static { this.dayNamesShort = [nls.localize(1396, "Sun"), nls.localize(1397, "Mon"), nls.localize(1398, "Tue"), nls.localize(1399, "Wed"), nls.localize(1400, "Thu"), nls.localize(1401, "Fri"), nls.localize(1402, "Sat")]; }
243
- static { this.monthNames = [nls.localize(1403, "January"), nls.localize(1404, "February"), nls.localize(1405, "March"), nls.localize(1406, "April"), nls.localize(1407, "May"), nls.localize(1408, "June"), nls.localize(1409, "July"), nls.localize(1410, "August"), nls.localize(1411, "September"), nls.localize(1412, "October"), nls.localize(1413, "November"), nls.localize(1414, "December")]; }
244
- static { this.monthNamesShort = [nls.localize(1415, "Jan"), nls.localize(1416, "Feb"), nls.localize(1417, "Mar"), nls.localize(1418, "Apr"), nls.localize(1419, "May"), nls.localize(1420, "Jun"), nls.localize(1421, "Jul"), nls.localize(1422, "Aug"), nls.localize(1423, "Sep"), nls.localize(1424, "Oct"), nls.localize(1425, "Nov"), nls.localize(1426, "Dec")]; }
241
+ static { this.dayNames = [nls.localize(1390, "Sunday"), nls.localize(1391, "Monday"), nls.localize(1392, "Tuesday"), nls.localize(1393, "Wednesday"), nls.localize(1394, "Thursday"), nls.localize(1395, "Friday"), nls.localize(1396, "Saturday")]; }
242
+ static { this.dayNamesShort = [nls.localize(1397, "Sun"), nls.localize(1398, "Mon"), nls.localize(1399, "Tue"), nls.localize(1400, "Wed"), nls.localize(1401, "Thu"), nls.localize(1402, "Fri"), nls.localize(1403, "Sat")]; }
243
+ static { this.monthNames = [nls.localize(1404, "January"), nls.localize(1405, "February"), nls.localize(1406, "March"), nls.localize(1407, "April"), nls.localize(1408, "May"), nls.localize(1409, "June"), nls.localize(1410, "July"), nls.localize(1411, "August"), nls.localize(1412, "September"), nls.localize(1413, "October"), nls.localize(1414, "November"), nls.localize(1415, "December")]; }
244
+ static { this.monthNamesShort = [nls.localize(1416, "Jan"), nls.localize(1417, "Feb"), nls.localize(1418, "Mar"), nls.localize(1419, "Apr"), nls.localize(1420, "May"), nls.localize(1421, "Jun"), nls.localize(1422, "Jul"), nls.localize(1423, "Aug"), nls.localize(1424, "Sep"), nls.localize(1425, "Oct"), nls.localize(1426, "Nov"), nls.localize(1427, "Dec")]; }
245
245
  resolve(variable) {
246
246
  const { name } = variable;
247
247
  if (name === 'CURRENT_YEAR') {
@@ -15,17 +15,17 @@ export class ToggleStickyScroll extends EditorAction2 {
15
15
  super({
16
16
  id: 'editor.action.toggleStickyScroll',
17
17
  title: {
18
- ...localize2(1431, "Toggle Editor Sticky Scroll"),
19
- mnemonicTitle: localize(1427, "&&Toggle Editor Sticky Scroll"),
18
+ ...localize2(1432, "Toggle Editor Sticky Scroll"),
19
+ mnemonicTitle: localize(1428, "&&Toggle Editor Sticky Scroll"),
20
20
  },
21
21
  metadata: {
22
- description: localize2(1432, "Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport"),
22
+ description: localize2(1433, "Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport"),
23
23
  },
24
24
  category: Categories.View,
25
25
  toggled: {
26
26
  condition: ContextKeyExpr.equals('config.editor.stickyScroll.enabled', true),
27
- title: localize(1428, "Sticky Scroll"),
28
- mnemonicTitle: localize(1429, "&&Sticky Scroll"),
27
+ title: localize(1429, "Sticky Scroll"),
28
+ mnemonicTitle: localize(1430, "&&Sticky Scroll"),
29
29
  },
30
30
  menu: [
31
31
  { id: MenuId.CommandPalette },
@@ -50,8 +50,8 @@ export class FocusStickyScroll extends EditorAction2 {
50
50
  super({
51
51
  id: 'editor.action.focusStickyScroll',
52
52
  title: {
53
- ...localize2(1433, "Focus Editor Sticky Scroll"),
54
- mnemonicTitle: localize(1430, "&&Focus Editor Sticky Scroll"),
53
+ ...localize2(1434, "Focus Editor Sticky Scroll"),
54
+ mnemonicTitle: localize(1431, "&&Focus Editor Sticky Scroll"),
55
55
  },
56
56
  precondition: ContextKeyExpr.and(ContextKeyExpr.has('config.editor.stickyScroll.enabled'), EditorContextKeys.stickyScrollVisible),
57
57
  menu: [
@@ -67,7 +67,7 @@ export class SelectNextStickyScrollLine extends EditorAction2 {
67
67
  constructor() {
68
68
  super({
69
69
  id: 'editor.action.selectNextStickyScrollLine',
70
- title: localize2(1434, "Select the next editor sticky scroll line"),
70
+ title: localize2(1435, "Select the next editor sticky scroll line"),
71
71
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
72
72
  keybinding: {
73
73
  weight,
@@ -83,7 +83,7 @@ export class SelectPreviousStickyScrollLine extends EditorAction2 {
83
83
  constructor() {
84
84
  super({
85
85
  id: 'editor.action.selectPreviousStickyScrollLine',
86
- title: localize2(1435, "Select the previous sticky scroll line"),
86
+ title: localize2(1436, "Select the previous sticky scroll line"),
87
87
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
88
88
  keybinding: {
89
89
  weight,
@@ -99,7 +99,7 @@ export class GoToStickyScrollLine extends EditorAction2 {
99
99
  constructor() {
100
100
  super({
101
101
  id: 'editor.action.goToFocusedStickyScrollLine',
102
- title: localize2(1436, "Go to the focused sticky scroll line"),
102
+ title: localize2(1437, "Go to the focused sticky scroll line"),
103
103
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
104
104
  keybinding: {
105
105
  weight,
@@ -115,7 +115,7 @@ export class SelectEditor extends EditorAction2 {
115
115
  constructor() {
116
116
  super({
117
117
  id: 'editor.action.selectEditor',
118
- title: localize2(1437, "Select Editor"),
118
+ title: localize2(1438, "Select Editor"),
119
119
  precondition: EditorContextKeys.stickyScrollFocused.isEqualTo(true),
120
120
  keybinding: {
121
121
  weight,
@@ -21,14 +21,14 @@ import { ILanguageFeaturesService } from '../../../common/services/languageFeatu
21
21
  import { historyNavigationVisible } from '../../../../platform/history/browser/contextScopedHistoryWidget.js';
22
22
  export const Context = {
23
23
  Visible: historyNavigationVisible,
24
- HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(1438, "Whether any suggestion is focused")),
25
- DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(1439, "Whether suggestion details are visible")),
26
- MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(1440, "Whether there are multiple suggestions to pick from")),
27
- MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(1441, "Whether inserting the current suggestion yields in a change or has everything already been typed")),
28
- AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(1442, "Whether suggestions are inserted when pressing Enter")),
29
- HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(1443, "Whether the current suggestion has insert and replace behaviour")),
30
- InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(1444, "Whether the default behaviour is to insert or replace") }),
31
- CanResolve: new RawContextKey('suggestionCanResolve', false, localize(1445, "Whether the current suggestion supports to resolve further details")),
24
+ HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(1439, "Whether any suggestion is focused")),
25
+ DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(1440, "Whether suggestion details are visible")),
26
+ MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(1441, "Whether there are multiple suggestions to pick from")),
27
+ MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(1442, "Whether inserting the current suggestion yields in a change or has everything already been typed")),
28
+ AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(1443, "Whether suggestions are inserted when pressing Enter")),
29
+ HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(1444, "Whether the current suggestion has insert and replace behaviour")),
30
+ InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(1445, "Whether the default behaviour is to insert or replace") }),
31
+ CanResolve: new RawContextKey('suggestionCanResolve', false, localize(1446, "Whether the current suggestion supports to resolve further details")),
32
32
  };
33
33
  export const suggestWidgetStatusbarMenu = new MenuId('suggestWidgetStatusBar');
34
34
  export class CompletionItem {
@@ -482,7 +482,7 @@ let SuggestController = class SuggestController {
482
482
  }
483
483
  _alertCompletionItem(item) {
484
484
  if (isNonEmptyArray(item.completion.additionalTextEdits)) {
485
- const msg = nls.localize(1446, "Accepting '{0}' made {1} additional edits", item.textLabel, item.completion.additionalTextEdits.length);
485
+ const msg = nls.localize(1447, "Accepting '{0}' made {1} additional edits", item.textLabel, item.completion.additionalTextEdits.length);
486
486
  alert(msg);
487
487
  }
488
488
  }
@@ -669,7 +669,7 @@ export class TriggerSuggestAction extends EditorAction {
669
669
  constructor() {
670
670
  super({
671
671
  id: TriggerSuggestAction.id,
672
- label: nls.localize2(1454, "Trigger Suggest"),
672
+ label: nls.localize2(1455, "Trigger Suggest"),
673
673
  precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCompletionItemProvider, SuggestContext.Visible.toNegated()),
674
674
  kbOpts: {
675
675
  kbExpr: EditorContextKeys.textInputFocus,
@@ -717,19 +717,19 @@ registerEditorCommand(new SuggestCommand({
717
717
  }],
718
718
  menuOpts: [{
719
719
  menuId: suggestWidgetStatusbarMenu,
720
- title: nls.localize(1447, "Insert"),
720
+ title: nls.localize(1448, "Insert"),
721
721
  group: 'left',
722
722
  order: 1,
723
723
  when: SuggestContext.HasInsertAndReplaceRange.toNegated()
724
724
  }, {
725
725
  menuId: suggestWidgetStatusbarMenu,
726
- title: nls.localize(1448, "Insert"),
726
+ title: nls.localize(1449, "Insert"),
727
727
  group: 'left',
728
728
  order: 1,
729
729
  when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert'))
730
730
  }, {
731
731
  menuId: suggestWidgetStatusbarMenu,
732
- title: nls.localize(1449, "Replace"),
732
+ title: nls.localize(1450, "Replace"),
733
733
  group: 'left',
734
734
  order: 1,
735
735
  when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace'))
@@ -752,13 +752,13 @@ registerEditorCommand(new SuggestCommand({
752
752
  group: 'left',
753
753
  order: 2,
754
754
  when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert')),
755
- title: nls.localize(1450, "Replace")
755
+ title: nls.localize(1451, "Replace")
756
756
  }, {
757
757
  menuId: suggestWidgetStatusbarMenu,
758
758
  group: 'left',
759
759
  order: 2,
760
760
  when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace')),
761
- title: nls.localize(1451, "Insert")
761
+ title: nls.localize(1452, "Insert")
762
762
  }]
763
763
  }));
764
764
  // continue to support the old command
@@ -866,13 +866,13 @@ registerEditorCommand(new SuggestCommand({
866
866
  group: 'right',
867
867
  order: 1,
868
868
  when: ContextKeyExpr.and(SuggestContext.DetailsVisible, SuggestContext.CanResolve),
869
- title: nls.localize(1452, "Show Less")
869
+ title: nls.localize(1453, "Show Less")
870
870
  }, {
871
871
  menuId: suggestWidgetStatusbarMenu,
872
872
  group: 'right',
873
873
  order: 1,
874
874
  when: ContextKeyExpr.and(SuggestContext.DetailsVisible.toNegated(), SuggestContext.CanResolve),
875
- title: nls.localize(1453, "Show More")
875
+ title: nls.localize(1454, "Show More")
876
876
  }]
877
877
  }));
878
878
  registerEditorCommand(new SuggestCommand({
@@ -931,7 +931,7 @@ registerEditorAction(class extends EditorAction {
931
931
  constructor() {
932
932
  super({
933
933
  id: 'editor.action.resetSuggestSize',
934
- label: nls.localize2(1455, "Reset Suggest Widget Size"),
934
+ label: nls.localize2(1456, "Reset Suggest Widget Size"),
935
935
  precondition: undefined
936
936
  });
937
937
  }
@@ -43,15 +43,15 @@ import { isWindows } from '../../../../base/common/platform.js';
43
43
  /**
44
44
  * Suggest widget colors
45
45
  */
46
- registerColor('editorSuggestWidget.background', editorWidgetBackground, nls.localize(1456, 'Background color of the suggest widget.'));
47
- registerColor('editorSuggestWidget.border', editorWidgetBorder, nls.localize(1457, 'Border color of the suggest widget.'));
48
- export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', editorForeground, nls.localize(1458, 'Foreground color of the suggest widget.'));
49
- registerColor('editorSuggestWidget.selectedForeground', quickInputListFocusForeground, nls.localize(1459, 'Foreground color of the selected entry in the suggest widget.'));
50
- registerColor('editorSuggestWidget.selectedIconForeground', quickInputListFocusIconForeground, nls.localize(1460, 'Icon foreground color of the selected entry in the suggest widget.'));
51
- export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', quickInputListFocusBackground, nls.localize(1461, 'Background color of the selected entry in the suggest widget.'));
52
- registerColor('editorSuggestWidget.highlightForeground', listHighlightForeground, nls.localize(1462, 'Color of the match highlights in the suggest widget.'));
53
- registerColor('editorSuggestWidget.focusHighlightForeground', listFocusHighlightForeground, nls.localize(1463, 'Color of the match highlights in the suggest widget when an item is focused.'));
54
- registerColor('editorSuggestWidgetStatus.foreground', transparent(editorSuggestWidgetForeground, .5), nls.localize(1464, 'Foreground color of the suggest widget status.'));
46
+ registerColor('editorSuggestWidget.background', editorWidgetBackground, nls.localize(1457, 'Background color of the suggest widget.'));
47
+ registerColor('editorSuggestWidget.border', editorWidgetBorder, nls.localize(1458, 'Border color of the suggest widget.'));
48
+ export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', editorForeground, nls.localize(1459, 'Foreground color of the suggest widget.'));
49
+ registerColor('editorSuggestWidget.selectedForeground', quickInputListFocusForeground, nls.localize(1460, 'Foreground color of the selected entry in the suggest widget.'));
50
+ registerColor('editorSuggestWidget.selectedIconForeground', quickInputListFocusIconForeground, nls.localize(1461, 'Icon foreground color of the selected entry in the suggest widget.'));
51
+ export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', quickInputListFocusBackground, nls.localize(1462, 'Background color of the selected entry in the suggest widget.'));
52
+ registerColor('editorSuggestWidget.highlightForeground', listHighlightForeground, nls.localize(1463, 'Color of the match highlights in the suggest widget.'));
53
+ registerColor('editorSuggestWidget.focusHighlightForeground', listFocusHighlightForeground, nls.localize(1464, 'Color of the match highlights in the suggest widget when an item is focused.'));
54
+ registerColor('editorSuggestWidgetStatus.foreground', transparent(editorSuggestWidgetForeground, .5), nls.localize(1465, 'Foreground color of the suggest widget status.'));
55
55
  class PersistedWidgetSize {
56
56
  constructor(_service, editor) {
57
57
  this._service = _service;
@@ -79,8 +79,8 @@ class PersistedWidgetSize {
79
79
  }
80
80
  let SuggestWidget = class SuggestWidget {
81
81
  static { SuggestWidget_1 = this; }
82
- static { this.LOADING_MESSAGE = nls.localize(1465, "Loading..."); }
83
- static { this.NO_SUGGESTIONS_MESSAGE = nls.localize(1466, "No suggestions."); }
82
+ static { this.LOADING_MESSAGE = nls.localize(1466, "Loading..."); }
83
+ static { this.NO_SUGGESTIONS_MESSAGE = nls.localize(1467, "No suggestions."); }
84
84
  constructor(editor, _storageService, _contextKeyService, _themeService, instantiationService) {
85
85
  this.editor = editor;
86
86
  this._storageService = _storageService;
@@ -167,7 +167,7 @@ let SuggestWidget = class SuggestWidget {
167
167
  multipleSelectionSupport: false,
168
168
  accessibilityProvider: {
169
169
  getRole: () => isWindows ? 'listitem' : 'option',
170
- getWidgetAriaLabel: () => nls.localize(1467, "Suggest"),
170
+ getWidgetAriaLabel: () => nls.localize(1468, "Suggest"),
171
171
  getWidgetRole: () => 'listbox',
172
172
  getAriaLabel: (item) => {
173
173
  let label = item.textLabel;
@@ -175,24 +175,24 @@ let SuggestWidget = class SuggestWidget {
175
175
  if (typeof item.completion.label !== 'string') {
176
176
  const { detail, description } = item.completion.label;
177
177
  if (detail && description) {
178
- label = nls.localize(1468, '{0} {1}, {2}, {3}', label, detail, description, kindLabel);
178
+ label = nls.localize(1469, '{0} {1}, {2}, {3}', label, detail, description, kindLabel);
179
179
  }
180
180
  else if (detail) {
181
- label = nls.localize(1469, '{0} {1}, {2}', label, detail, kindLabel);
181
+ label = nls.localize(1470, '{0} {1}, {2}', label, detail, kindLabel);
182
182
  }
183
183
  else if (description) {
184
- label = nls.localize(1470, '{0}, {1}, {2}', label, description, kindLabel);
184
+ label = nls.localize(1471, '{0}, {1}, {2}', label, description, kindLabel);
185
185
  }
186
186
  }
187
187
  else {
188
- label = nls.localize(1471, '{0}, {1}', label, kindLabel);
188
+ label = nls.localize(1472, '{0}, {1}', label, kindLabel);
189
189
  }
190
190
  if (!item.isResolved || !this._isDetailsVisible()) {
191
191
  return label;
192
192
  }
193
193
  const { documentation, detail } = item.completion;
194
194
  const docs = strings.format('{0}{1}', detail || '', documentation ? (typeof documentation === 'string' ? documentation : documentation.value) : '');
195
- return nls.localize(1472, "{0}, docs: {1}", label, docs);
195
+ return nls.localize(1473, "{0}, docs: {1}", label, docs);
196
196
  },
197
197
  }
198
198
  });
@@ -47,7 +47,7 @@ let SuggestDetailsWidget = class SuggestDetailsWidget {
47
47
  this._disposables.add(this._scrollbar);
48
48
  this._header = dom.append(this._body, dom.$('.header'));
49
49
  this._close = dom.append(this._header, dom.$('span' + ThemeIcon.asCSSSelector(Codicon.close)));
50
- this._close.title = nls.localize(1473, "Close");
50
+ this._close.title = nls.localize(1474, "Close");
51
51
  this._close.role = 'button';
52
52
  this._close.tabIndex = -1;
53
53
  this._type = dom.append(this._header, dom.$('p.type'));
@@ -93,7 +93,7 @@ let SuggestDetailsWidget = class SuggestDetailsWidget {
93
93
  };
94
94
  }
95
95
  renderLoading() {
96
- this._type.textContent = nls.localize(1474, "Loading...");
96
+ this._type.textContent = nls.localize(1475, "Loading...");
97
97
  this._docs.textContent = '';
98
98
  this.domNode.classList.remove('no-docs', 'no-type');
99
99
  this.layout(this.size.width, this.getLayoutInfo().lineHeight * 2);
@@ -28,7 +28,7 @@ import { FileKind } from '../../../../platform/files/common/files.js';
28
28
  import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
29
29
  import { IThemeService } from '../../../../platform/theme/common/themeService.js';
30
30
  import { canExpandCompletionItem } from './suggestWidgetDetails.js';
31
- const suggestMoreInfoIcon = registerIcon('suggest-more-info', Codicon.chevronRight, nls.localize(1475, 'Icon for more information in the suggest widget.'));
31
+ const suggestMoreInfoIcon = registerIcon('suggest-more-info', Codicon.chevronRight, nls.localize(1476, 'Icon for more information in the suggest widget.'));
32
32
  const _completionItemColor = new class ColorExtractor {
33
33
  static { this._regexRelaxed = /(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/; }
34
34
  static { this._regexStrict = new RegExp(`^${ColorExtractor._regexRelaxed.source}$`, 'i'); }
@@ -84,7 +84,7 @@ let ItemRenderer = class ItemRenderer {
84
84
  const qualifierLabel = append(left, $('span.qualifier-label'));
85
85
  const detailsLabel = append(right, $('span.details-label'));
86
86
  const readMore = append(right, $('span.readMore' + ThemeIcon.asCSSSelector(suggestMoreInfoIcon)));
87
- readMore.title = nls.localize(1476, "Read More");
87
+ readMore.title = nls.localize(1477, "Read More");
88
88
  const configureFont = () => {
89
89
  const options = this._editor.getOptions();
90
90
  const fontInfo = options.get(59 /* EditorOption.fontInfo */);
@@ -16,7 +16,7 @@ import { IContextKeyService, RawContextKey } from '../../../../platform/contextk
16
16
  import { localize } from '../../../../nls.js';
17
17
  let WordContextKey = class WordContextKey {
18
18
  static { WordContextKey_1 = this; }
19
- static { this.AtEnd = new RawContextKey('atEndOfWord', false, { type: 'boolean', description: localize(1477, "A context key that is true when at the end of a word. Note that this is only defined when tab-completions are enabled") }); }
19
+ static { this.AtEnd = new RawContextKey('atEndOfWord', false, { type: 'boolean', description: localize(1478, "A context key that is true when at the end of a word. Note that this is only defined when tab-completions are enabled") }); }
20
20
  constructor(_editor, contextKeyService) {
21
21
  this._editor = _editor;
22
22
  this._enabled = false;