monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251217

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 (336) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +30 -4
  18. package/esm/vs/base/browser/dom.js +1 -4
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/markdownRenderer.js +25 -11
  21. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  22. package/esm/vs/base/browser/ui/button/button.js +15 -8
  23. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  24. package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
  25. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  26. package/esm/vs/base/browser/ui/list/list.css +1 -0
  27. package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
  28. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  29. package/esm/vs/base/common/codiconsLibrary.js +11 -2
  30. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  31. package/esm/vs/base/common/defaultAccount.js +6 -0
  32. package/esm/vs/base/common/defaultAccount.js.map +1 -0
  33. package/esm/vs/base/common/equals.js +73 -24
  34. package/esm/vs/base/common/equals.js.map +1 -1
  35. package/esm/vs/base/common/event.js +14 -4
  36. package/esm/vs/base/common/event.js.map +1 -1
  37. package/esm/vs/base/common/iterator.js.map +1 -1
  38. package/esm/vs/base/common/keybindings.js +0 -8
  39. package/esm/vs/base/common/keybindings.js.map +1 -1
  40. package/esm/vs/base/common/lifecycle.js +2 -2
  41. package/esm/vs/base/common/lifecycle.js.map +1 -1
  42. package/esm/vs/base/common/marshallingIds.js.map +1 -1
  43. package/esm/vs/base/common/observableInternal/index.js +1 -1
  44. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  45. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
  46. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  47. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
  48. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  49. package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
  50. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  51. package/esm/vs/base/common/product.js.map +1 -1
  52. package/esm/vs/base/common/strings.js +3 -1
  53. package/esm/vs/base/common/strings.js.map +1 -1
  54. package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
  55. package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
  56. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
  57. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  58. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
  59. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  60. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
  61. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
  62. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  63. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
  64. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
  65. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
  66. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
  67. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
  68. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
  69. package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
  70. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  71. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  72. package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
  73. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  74. package/esm/vs/editor/browser/view.js +11 -2
  75. package/esm/vs/editor/browser/view.js.map +1 -1
  76. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
  77. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  78. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
  79. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  80. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  81. package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
  82. package/esm/vs/editor/common/config/fontInfo.js +1 -1
  83. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  84. package/esm/vs/editor/common/core/edits/edit.js +19 -0
  85. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  86. package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
  87. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  88. package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
  89. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  90. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
  91. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
  92. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  93. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  94. package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
  95. package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
  96. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
  97. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
  98. package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
  99. package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
  100. package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
  101. package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
  102. package/esm/vs/editor/common/languages.js +2 -1
  103. package/esm/vs/editor/common/languages.js.map +1 -1
  104. package/esm/vs/editor/common/model/decorationProvider.js +21 -1
  105. package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
  106. package/esm/vs/editor/common/model/textModel.js +49 -30
  107. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  108. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
  109. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
  110. package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
  111. package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
  112. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
  113. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
  114. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
  115. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
  116. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
  117. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
  118. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  119. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  120. package/esm/vs/editor/common/textModelEvents.js.map +1 -1
  121. package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
  122. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
  123. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  124. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
  125. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  126. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
  127. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  128. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  129. package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
  130. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
  131. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  132. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  133. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
  134. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  135. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
  136. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
  137. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
  138. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  139. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
  140. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
  141. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
  142. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  143. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  144. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  145. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
  146. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  147. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
  148. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
  149. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
  150. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
  151. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
  152. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
  153. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
  154. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  155. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
  156. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  157. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
  158. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  159. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
  160. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
  161. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
  162. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
  163. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  164. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
  165. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
  166. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
  167. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  168. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
  169. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  170. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
  171. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  172. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
  173. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  174. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
  175. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  176. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
  177. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  178. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
  179. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  180. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
  181. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  182. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
  183. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
  184. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
  185. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
  186. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
  187. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
  188. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
  189. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  190. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
  191. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
  192. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
  193. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
  194. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
  213. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  214. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  215. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  216. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  217. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  218. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  219. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  220. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  221. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  222. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  223. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  224. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  225. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
  226. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  227. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  228. package/esm/vs/editor/contrib/rename/browser/rename.js +19 -15
  229. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  230. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  231. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
  232. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
  233. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  234. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  235. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
  236. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
  237. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  238. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  239. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
  240. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  241. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
  242. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  243. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
  244. package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
  245. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
  246. package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
  247. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
  248. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
  249. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
  250. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  251. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
  252. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  253. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  254. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  255. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  256. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  257. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  258. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  259. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  260. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  261. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  262. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  263. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
  264. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
  265. package/esm/vs/editor/editor.api.d.ts +34 -3
  266. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
  267. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  268. package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
  269. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  270. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
  271. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
  272. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  273. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  274. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  275. package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
  276. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  277. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  278. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  279. package/esm/vs/platform/actions/common/actions.js +11 -5
  280. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  281. package/esm/vs/platform/actions/common/menuService.js +2 -2
  282. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  283. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  284. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  285. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  286. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  287. package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
  288. package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
  289. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  290. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  291. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  292. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  293. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
  294. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  295. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  296. package/esm/vs/platform/list/browser/listService.js +27 -27
  297. package/esm/vs/platform/log/common/log.js +1 -1
  298. package/esm/vs/platform/log/common/log.js.map +1 -1
  299. package/esm/vs/platform/markers/common/markerService.js +6 -6
  300. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  301. package/esm/vs/platform/markers/common/markers.js +6 -6
  302. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  303. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  304. package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
  305. package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
  306. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  307. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  308. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  309. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  310. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  311. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  312. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  313. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
  314. package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
  315. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  316. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  317. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  318. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  319. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  320. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  321. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  322. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  323. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  324. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  325. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  326. package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
  327. package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
  328. package/esm/vs/platform/window/common/window.js +1 -1
  329. package/esm/vs/platform/window/common/window.js.map +1 -1
  330. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  331. package/monaco.d.ts +34 -3
  332. package/package.json +2 -2
  333. package/version.txt +1 -1
  334. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
  335. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
  336. package/esm/vs/platform/product/common/productService.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/standalone/browser/standaloneLanguages.ts","vs/editor/standalone/browser/standaloneLanguages.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAA2B,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AACxG,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAGxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,eAAe,MAAM,4CAA4C,CAAC;AAC9E,OAAO,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iCAAiC;QACzE,mDAAmD;QACnD,0BAA0B,EAAO,0BAA0B;QAE3D,QAAQ;QACR,qBAAqB,EAAE,eAAe,CAAC,qBAAqB;QAC5D,kBAAkB,EAAE,eAAe,CAAC,kBAAkB;QACtD,iBAAiB,EAAE,eAAe,CAAC,iBAAiB;QACpD,4BAA4B,EAAE,eAAe,CAAC,4BAA4B;QAC1E,UAAU,EAAE,eAAe,CAAC,UAAU;QACtC,SAAS,EAAE,eAAe,CAAC,SAAS;QACpC,YAAY,EAAE,eAAe,CAAC,YAAY;QAC1C,qBAAqB,EAAE,eAAe,CAAC,qBAAqB;QAC5D,wBAAwB,EAAE,eAAe,CAAC,wBAAwB;QAClE,aAAa,EAAE,eAAe,CAAC,aAAa;QAC5C,2BAA2B,EAAE,eAAe,CAAC,2BAA2B;QACxE,qBAAqB,EAAE,eAAe,CAAC,qBAAqB;QAC5D,gBAAgB,EAAE,eAAe,CAAC,gBAAgB;QAClD,wBAAwB,EAAE,eAAe,CAAC,wBAAwB;QAClE,wBAAwB,EAAE,eAAe,CAAC,wBAAwB;QAClE,oBAAoB,EAAE,eAAe,CAAC,oBAAoB;QAC1D,mCAAmC,EAAE,eAAe,CAAC,mCAAmC;QACxF,yBAAyB,EAAE,eAAe,CAAC,yBAAyB;QAEpE,UAAU;QACV,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;QAC5C,mDAAmD;QACnD,sBAAsB,EAAO,SAAS,CAAC,sBAAsB;QAC7D,mDAAmD;QACnD,aAAa,EAAO,aAAa;KACjC,CAAC;AACH,CAAC","file":"standaloneLanguages.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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Color } from '../../../base/common/color.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { Position } from '../../common/core/position.js';\nimport { Range } from '../../common/core/range.js';\nimport { MetadataConsts } from '../../common/encodedTokenAttributes.js';\nimport * as languages from '../../common/languages.js';\nimport { ILanguageExtensionPoint, ILanguageService } from '../../common/languages/language.js';\nimport { LanguageConfiguration } from '../../common/languages/languageConfiguration.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { ModesRegistry } from '../../common/languages/modesRegistry.js';\nimport { LanguageSelector } from '../../common/languageSelector.js';\nimport * as model from '../../common/model.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport * as standaloneEnums from '../../common/standalone/standaloneEnums.js';\nimport { StandaloneServices } from './standaloneServices.js';\nimport { compile } from '../common/monarch/monarchCompile.js';\nimport { MonarchTokenizer } from '../common/monarch/monarchLexer.js';\nimport { IMonarchLanguage } from '../common/monarch/monarchTypes.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { IMarkerData, IMarkerService } from '../../../platform/markers/common/markers.js';\nimport { EditDeltaInfo } from '../../common/textModelEditSource.js';\n\n/**\n * Register information about a new language.\n */\nexport function register(language: ILanguageExtensionPoint): void {\n\t// Intentionally using the `ModesRegistry` here to avoid\n\t// instantiating services too quickly in the standalone editor.\n\tModesRegistry.registerLanguage(language);\n}\n\n/**\n * Get the information of all the registered languages.\n */\nexport function getLanguages(): ILanguageExtensionPoint[] {\n\tlet result: ILanguageExtensionPoint[] = [];\n\tresult = result.concat(ModesRegistry.getLanguages());\n\treturn result;\n}\n\nexport function getEncodedLanguageId(languageId: string): number {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\treturn languageService.languageIdCodec.encodeLanguageId(languageId);\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model.\n * @event\n */\nexport function onLanguage(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestRichLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model or\n * when a language is encountered during the tokenization of another language.\n * @event\n */\nexport function onLanguageEncountered(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestBasicLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * Set the editing configuration for a language.\n */\nexport function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set configuration for unknown language ${languageId}`);\n\t}\n\tconst languageConfigurationService = StandaloneServices.get(ILanguageConfigurationService);\n\treturn languageConfigurationService.register(languageId, configuration, 100);\n}\n\n/**\n * @internal\n */\nexport class EncodedTokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tprivate readonly _languageId: string;\n\tprivate readonly _actual: EncodedTokensProvider;\n\n\tconstructor(languageId: string, actual: EncodedTokensProvider) {\n\t\tthis._languageId = languageId;\n\t\tthis._actual = actual;\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\tif (typeof this._actual.tokenize === 'function') {\n\t\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, <{ tokenize(line: string, state: languages.IState): ILineTokens }>this._actual, line, state);\n\t\t}\n\t\tthrow new Error('Not supported!');\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst result = this._actual.tokenizeEncoded(line, state);\n\t\treturn new languages.EncodedTokenizationResult(result.tokens, result.endState);\n\t}\n}\n\n/**\n * @internal\n */\nexport class TokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tconstructor(\n\t\tprivate readonly _languageId: string,\n\t\tprivate readonly _actual: TokensProvider,\n\t\tprivate readonly _languageService: ILanguageService,\n\t\tprivate readonly _standaloneThemeService: IStandaloneThemeService,\n\t) {\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tprivate static _toClassicTokens(tokens: IToken[], language: string): languages.Token[] {\n\t\tconst result: languages.Token[] = [];\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[i] = new languages.Token(startIndex, t.scopes, language);\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static adaptTokenize(language: string, actual: { tokenize(line: string, state: languages.IState): ILineTokens }, line: string, state: languages.IState): languages.TokenizationResult {\n\t\tconst actualResult = actual.tokenize(line, state);\n\t\tconst tokens = TokenizationSupportAdapter._toClassicTokens(actualResult.tokens, language);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.TokenizationResult(tokens, endState);\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, this._actual, line, state);\n\t}\n\n\tprivate _toBinaryTokens(languageIdCodec: languages.ILanguageIdCodec, tokens: IToken[]): Uint32Array {\n\t\tconst languageId = languageIdCodec.encodeLanguageId(this._languageId);\n\t\tconst tokenTheme = this._standaloneThemeService.getColorTheme().tokenTheme;\n\n\t\tconst result: number[] = [];\n\t\tlet resultLen = 0;\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tconst metadata = tokenTheme.match(languageId, t.scopes) | MetadataConsts.BALANCED_BRACKETS_MASK;\n\t\t\tif (resultLen > 0 && result[resultLen - 1] === metadata) {\n\t\t\t\t// same metadata\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[resultLen++] = startIndex;\n\t\t\tresult[resultLen++] = metadata;\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\n\t\tconst actualResult = new Uint32Array(resultLen);\n\t\tfor (let i = 0; i < resultLen; i++) {\n\t\t\tactualResult[i] = result[i];\n\t\t}\n\t\treturn actualResult;\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst actualResult = this._actual.tokenize(line, state);\n\t\tconst tokens = this._toBinaryTokens(this._languageService.languageIdCodec, actualResult.tokens);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.EncodedTokenizationResult(tokens, endState);\n\t}\n}\n\n/**\n * A token.\n */\nexport interface IToken {\n\tstartIndex: number;\n\tscopes: string;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface ILineTokens {\n\t/**\n\t * The list of tokens on the line.\n\t */\n\ttokens: IToken[];\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface IEncodedLineTokens {\n\t/**\n\t * The tokens on the line in a binary, encoded format. Each token occupies two array indices. For token i:\n\t * - at offset 2*i => startIndex\n\t * - at offset 2*i + 1 => metadata\n\t * Meta data is in binary format:\n\t * - -------------------------------------------\n\t * 3322 2222 2222 1111 1111 1100 0000 0000\n\t * 1098 7654 3210 9876 5432 1098 7654 3210\n\t * - -------------------------------------------\n\t * bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL\n\t * - -------------------------------------------\n\t * - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.\n\t * - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.\n\t * - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.\n\t * - f = foreground ColorId (9 bits)\n\t * - b = background ColorId (9 bits)\n\t * - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:\n\t * e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,\n\t * id = 1 is for the default foreground color, id = 2 for the default background.\n\t */\n\ttokens: Uint32Array;\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * A factory for token providers.\n */\nexport interface TokensProviderFactory {\n\tcreate(): languages.ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;\n}\n\n/**\n * A \"manual\" provider of tokens.\n */\nexport interface TokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize(line: string, state: languages.IState): ILineTokens;\n}\n\n/**\n * A \"manual\" provider of tokens, returning tokens in a binary form.\n */\nexport interface EncodedTokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenizeEncoded(line: string, state: languages.IState): IEncodedLineTokens;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize?(line: string, state: languages.IState): ILineTokens;\n}\n\nfunction isATokensProvider(provider: TokensProvider | EncodedTokensProvider | IMonarchLanguage): provider is TokensProvider | EncodedTokensProvider {\n\treturn (typeof provider.getInitialState === 'function');\n}\n\nfunction isEncodedTokensProvider(provider: TokensProvider | EncodedTokensProvider): provider is EncodedTokensProvider {\n\treturn 'tokenizeEncoded' in provider;\n}\n\nfunction isThenable<T>(obj: any): obj is Thenable<T> {\n\treturn obj && typeof obj.then === 'function';\n}\n\n/**\n * Change the color map that is used for token colors.\n * Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA\n */\nexport function setColorMap(colorMap: string[] | null): void {\n\tconst standaloneThemeService = StandaloneServices.get(IStandaloneThemeService);\n\tif (colorMap) {\n\t\tconst result: Color[] = [null!];\n\t\tfor (let i = 1, len = colorMap.length; i < len; i++) {\n\t\t\tresult[i] = Color.fromHex(colorMap[i]);\n\t\t}\n\t\tstandaloneThemeService.setColorMapOverride(result);\n\t} else {\n\t\tstandaloneThemeService.setColorMapOverride(null);\n\t}\n}\n\n/**\n * @internal\n */\nfunction createTokenizationSupportAdapter(languageId: string, provider: TokensProvider | EncodedTokensProvider) {\n\tif (isEncodedTokensProvider(provider)) {\n\t\treturn new EncodedTokenizationSupportAdapter(languageId, provider);\n\t} else {\n\t\treturn new TokenizationSupportAdapter(\n\t\t\tlanguageId,\n\t\t\tprovider,\n\t\t\tStandaloneServices.get(ILanguageService),\n\t\t\tStandaloneServices.get(IStandaloneThemeService),\n\t\t);\n\t}\n}\n\n/**\n * Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer\n * set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together\n * with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable {\n\tconst adaptedFactory = new languages.LazyTokenizationSupport(async () => {\n\t\tconst result = await Promise.resolve(factory.create());\n\t\tif (!result) {\n\t\t\treturn null;\n\t\t}\n\t\tif (isATokensProvider(result)) {\n\t\t\treturn createTokenizationSupportAdapter(languageId, result);\n\t\t}\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, result), StandaloneServices.get(IConfigurationService));\n\t});\n\treturn languages.TokenizationRegistry.registerFactory(languageId, adaptedFactory);\n}\n\n/**\n * Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive\n * with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,\n * but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`\n * or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set tokens provider for unknown language ${languageId}`);\n\t}\n\tif (isThenable<TokensProvider | EncodedTokensProvider>(provider)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => provider });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, createTokenizationSupportAdapter(languageId, provider));\n}\n\n/**\n * Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive\n * with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will\n * work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or\n * `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable {\n\tconst create = (languageDef: IMonarchLanguage) => {\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, languageDef), StandaloneServices.get(IConfigurationService));\n\t};\n\tif (isThenable<IMonarchLanguage>(languageDef)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => languageDef });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, create(languageDef));\n}\n\n/**\n * Register a reference provider (used by e.g. reference search).\n */\nexport function registerReferenceProvider(languageSelector: LanguageSelector, provider: languages.ReferenceProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.referenceProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a rename provider (used by e.g. rename symbol).\n */\nexport function registerRenameProvider(languageSelector: LanguageSelector, provider: languages.RenameProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.renameProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)\n */\nexport function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: languages.NewSymbolNamesProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.newSymbolNamesProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a signature help provider (used by e.g. parameter hints).\n */\nexport function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: languages.SignatureHelpProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.signatureHelpProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a hover provider (used by e.g. editor hover).\n */\nexport function registerHoverProvider(languageSelector: LanguageSelector, provider: languages.HoverProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.hoverProvider.register(languageSelector, {\n\t\tprovideHover: async (model: model.ITextModel, position: Position, token: CancellationToken, context?: languages.HoverContext<languages.Hover>): Promise<languages.Hover | undefined> => {\n\t\t\tconst word = model.getWordAtPosition(position);\n\n\t\t\treturn Promise.resolve<languages.Hover | null | undefined>(provider.provideHover(model, position, token, context)).then((value): languages.Hover | undefined => {\n\t\t\t\tif (!value) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tif (!value.range && word) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n\t\t\t\t}\n\t\t\t\tif (!value.range) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Register a document symbol provider (used by e.g. outline).\n */\nexport function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: languages.DocumentSymbolProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSymbolProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document highlight provider (used by e.g. highlight occurrences).\n */\nexport function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: languages.DocumentHighlightProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentHighlightProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an linked editing range provider.\n */\nexport function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: languages.LinkedEditingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkedEditingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a definition provider (used by e.g. go to definition).\n */\nexport function registerDefinitionProvider(languageSelector: LanguageSelector, provider: languages.DefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.definitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a implementation provider (used by e.g. go to implementation).\n */\nexport function registerImplementationProvider(languageSelector: LanguageSelector, provider: languages.ImplementationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.implementationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a type definition provider (used by e.g. go to type definition).\n */\nexport function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: languages.TypeDefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.typeDefinitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code lens provider (used by e.g. inline code lenses).\n */\nexport function registerCodeLensProvider(languageSelector: LanguageSelector, provider: languages.CodeLensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeLensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code action provider (used by e.g. quick fix).\n */\nexport function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeActionProvider.register(languageSelector, {\n\t\tprovidedCodeActionKinds: metadata?.providedCodeActionKinds,\n\t\tdocumentation: metadata?.documentation,\n\t\tprovideCodeActions: (model: model.ITextModel, range: Range, context: languages.CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList> => {\n\t\t\tconst markerService = StandaloneServices.get(IMarkerService);\n\t\t\tconst markers = markerService.read({ resource: model.uri }).filter(m => {\n\t\t\t\treturn Range.areIntersectingOrTouching(m, range);\n\t\t\t});\n\t\t\treturn provider.provideCodeActions(model, range, { markers, only: context.only, trigger: context.trigger }, token);\n\t\t},\n\t\tresolveCodeAction: provider.resolveCodeAction\n\t});\n}\n\n/**\n * Register a formatter that can handle only entire models.\n */\nexport function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter that can handle a range inside a model.\n */\nexport function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter than can do formatting as the user types.\n */\nexport function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.OnTypeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.onTypeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a link provider that can find links in text.\n */\nexport function registerLinkProvider(languageSelector: LanguageSelector, provider: languages.LinkProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a completion item provider (use by e.g. suggestions).\n */\nexport function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: languages.CompletionItemProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.completionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document color provider (used by Color Picker, Color Decorator).\n */\nexport function registerColorProvider(languageSelector: LanguageSelector, provider: languages.DocumentColorProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.colorProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a folding range provider\n */\nexport function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: languages.FoldingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.foldingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a declaration provider\n */\nexport function registerDeclarationProvider(languageSelector: LanguageSelector, provider: languages.DeclarationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.declarationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a selection range provider\n */\nexport function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: languages.SelectionRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.selectionRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inline completions provider.\n */\nexport function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: languages.InlineCompletionsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlineCompletionsProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inlay hints provider.\n */\nexport function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: languages.InlayHintsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlayHintsProvider.register(languageSelector, provider);\n}\n\n/**\n * Contains additional diagnostic information about the context in which\n * a [code action](#CodeActionProvider.provideCodeActions) is run.\n */\nexport interface CodeActionContext {\n\n\t/**\n\t * An array of diagnostics.\n\t */\n\treadonly markers: IMarkerData[];\n\n\t/**\n\t * Requested kind of actions to return.\n\t */\n\treadonly only?: string;\n\n\t/**\n\t * The reason why code actions were requested.\n\t */\n\treadonly trigger: languages.CodeActionTriggerType;\n}\n\n/**\n * The code action interface defines the contract between extensions and\n * the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.\n */\nexport interface CodeActionProvider {\n\t/**\n\t * Provide commands for the given document and range.\n\t */\n\tprovideCodeActions(model: model.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList>;\n\n\t/**\n\t * Given a code action fill in the edit. Will only invoked when missing.\n\t */\n\tresolveCodeAction?(codeAction: languages.CodeAction, token: CancellationToken): languages.ProviderResult<languages.CodeAction>;\n}\n\n\n\n/**\n * Metadata about the type of code actions that a {@link CodeActionProvider} provides.\n */\nexport interface CodeActionProviderMetadata {\n\t/**\n\t * List of code action kinds that a {@link CodeActionProvider} may return.\n\t *\n\t * This list is used to determine if a given `CodeActionProvider` should be invoked or not.\n\t * To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The\n\t * list of kinds may either be generic, such as `[\"quickfix\", \"refactor\", \"source\"]`, or list out every kind provided,\n\t * such as `[\"quickfix.removeLine\", \"source.fixAll\" ...]`.\n\t */\n\treadonly providedCodeActionKinds?: readonly string[];\n\n\treadonly documentation?: ReadonlyArray<{ readonly kind: string; readonly command: languages.Command }>;\n}\n\n/**\n * @internal\n */\nexport function createMonacoLanguagesAPI(): typeof monaco.languages {\n\treturn {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregister: <any>register,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetLanguages: <any>getLanguages,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguage: <any>onLanguage,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguageEncountered: <any>onLanguageEncountered,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetEncodedLanguageId: <any>getEncodedLanguageId,\n\n\t\t// provider methods\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetLanguageConfiguration: <any>setLanguageConfiguration,\n\t\tsetColorMap: setColorMap,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTokensProviderFactory: <any>registerTokensProviderFactory,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetTokensProvider: <any>setTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetMonarchTokensProvider: <any>setMonarchTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterReferenceProvider: <any>registerReferenceProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterRenameProvider: <any>registerRenameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterNewSymbolNameProvider: <any>registerNewSymbolNameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCompletionItemProvider: <any>registerCompletionItemProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSignatureHelpProvider: <any>registerSignatureHelpProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterHoverProvider: <any>registerHoverProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSymbolProvider: <any>registerDocumentSymbolProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentHighlightProvider: <any>registerDocumentHighlightProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkedEditingRangeProvider: <any>registerLinkedEditingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDefinitionProvider: <any>registerDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterImplementationProvider: <any>registerImplementationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTypeDefinitionProvider: <any>registerTypeDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeLensProvider: <any>registerCodeLensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeActionProvider: <any>registerCodeActionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentFormattingEditProvider: <any>registerDocumentFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeFormattingEditProvider: <any>registerDocumentRangeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterOnTypeFormattingEditProvider: <any>registerOnTypeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkProvider: <any>registerLinkProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterColorProvider: <any>registerColorProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterFoldingRangeProvider: <any>registerFoldingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDeclarationProvider: <any>registerDeclarationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSelectionRangeProvider: <any>registerSelectionRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSemanticTokensProvider: <any>registerDocumentSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeSemanticTokensProvider: <any>registerDocumentRangeSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlineCompletionsProvider: <any>registerInlineCompletionsProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlayHintsProvider: <any>registerInlayHintsProvider,\n\n\t\t// enums\n\t\tDocumentHighlightKind: standaloneEnums.DocumentHighlightKind,\n\t\tCompletionItemKind: standaloneEnums.CompletionItemKind,\n\t\tCompletionItemTag: standaloneEnums.CompletionItemTag,\n\t\tCompletionItemInsertTextRule: standaloneEnums.CompletionItemInsertTextRule,\n\t\tSymbolKind: standaloneEnums.SymbolKind,\n\t\tSymbolTag: standaloneEnums.SymbolTag,\n\t\tIndentAction: standaloneEnums.IndentAction,\n\t\tCompletionTriggerKind: standaloneEnums.CompletionTriggerKind,\n\t\tSignatureHelpTriggerKind: standaloneEnums.SignatureHelpTriggerKind,\n\t\tInlayHintKind: standaloneEnums.InlayHintKind,\n\t\tInlineCompletionTriggerKind: standaloneEnums.InlineCompletionTriggerKind,\n\t\tCodeActionTriggerType: standaloneEnums.CodeActionTriggerType,\n\t\tNewSymbolNameTag: standaloneEnums.NewSymbolNameTag,\n\t\tNewSymbolNameTriggerKind: standaloneEnums.NewSymbolNameTriggerKind,\n\t\tPartialAcceptTriggerKind: standaloneEnums.PartialAcceptTriggerKind,\n\t\tHoverVerbosityAction: standaloneEnums.HoverVerbosityAction,\n\t\tInlineCompletionEndOfLifeReasonKind: standaloneEnums.InlineCompletionEndOfLifeReasonKind,\n\t\tInlineCompletionHintStyle: standaloneEnums.InlineCompletionHintStyle,\n\n\t\t// classes\n\t\tFoldingRangeKind: languages.FoldingRangeKind,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tSelectedSuggestionInfo: <any>languages.SelectedSuggestionInfo,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tEditDeltaInfo: <any>EditDeltaInfo,\n\t};\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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Color } from '../../../base/common/color.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { Position } from '../../common/core/position.js';\nimport { Range } from '../../common/core/range.js';\nimport { MetadataConsts } from '../../common/encodedTokenAttributes.js';\nimport * as languages from '../../common/languages.js';\nimport { ILanguageExtensionPoint, ILanguageService } from '../../common/languages/language.js';\nimport { LanguageConfiguration } from '../../common/languages/languageConfiguration.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { ModesRegistry } from '../../common/languages/modesRegistry.js';\nimport { LanguageSelector } from '../../common/languageSelector.js';\nimport * as model from '../../common/model.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport * as standaloneEnums from '../../common/standalone/standaloneEnums.js';\nimport { StandaloneServices } from './standaloneServices.js';\nimport { compile } from '../common/monarch/monarchCompile.js';\nimport { MonarchTokenizer } from '../common/monarch/monarchLexer.js';\nimport { IMonarchLanguage } from '../common/monarch/monarchTypes.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { IMarkerData, IMarkerService } from '../../../platform/markers/common/markers.js';\nimport { EditDeltaInfo } from '../../common/textModelEditSource.js';\n\n/**\n * Register information about a new language.\n */\nexport function register(language: ILanguageExtensionPoint): void {\n\t// Intentionally using the `ModesRegistry` here to avoid\n\t// instantiating services too quickly in the standalone editor.\n\tModesRegistry.registerLanguage(language);\n}\n\n/**\n * Get the information of all the registered languages.\n */\nexport function getLanguages(): ILanguageExtensionPoint[] {\n\tlet result: ILanguageExtensionPoint[] = [];\n\tresult = result.concat(ModesRegistry.getLanguages());\n\treturn result;\n}\n\nexport function getEncodedLanguageId(languageId: string): number {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\treturn languageService.languageIdCodec.encodeLanguageId(languageId);\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model.\n * @event\n */\nexport function onLanguage(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestRichLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model or\n * when a language is encountered during the tokenization of another language.\n * @event\n */\nexport function onLanguageEncountered(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestBasicLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * Set the editing configuration for a language.\n */\nexport function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set configuration for unknown language ${languageId}`);\n\t}\n\tconst languageConfigurationService = StandaloneServices.get(ILanguageConfigurationService);\n\treturn languageConfigurationService.register(languageId, configuration, 100);\n}\n\n/**\n * @internal\n */\nexport class EncodedTokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tprivate readonly _languageId: string;\n\tprivate readonly _actual: EncodedTokensProvider;\n\n\tconstructor(languageId: string, actual: EncodedTokensProvider) {\n\t\tthis._languageId = languageId;\n\t\tthis._actual = actual;\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\tif (typeof this._actual.tokenize === 'function') {\n\t\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, <{ tokenize(line: string, state: languages.IState): ILineTokens }>this._actual, line, state);\n\t\t}\n\t\tthrow new Error('Not supported!');\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst result = this._actual.tokenizeEncoded(line, state);\n\t\treturn new languages.EncodedTokenizationResult(result.tokens, result.endState);\n\t}\n}\n\n/**\n * @internal\n */\nexport class TokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tconstructor(\n\t\tprivate readonly _languageId: string,\n\t\tprivate readonly _actual: TokensProvider,\n\t\tprivate readonly _languageService: ILanguageService,\n\t\tprivate readonly _standaloneThemeService: IStandaloneThemeService,\n\t) {\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tprivate static _toClassicTokens(tokens: IToken[], language: string): languages.Token[] {\n\t\tconst result: languages.Token[] = [];\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[i] = new languages.Token(startIndex, t.scopes, language);\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static adaptTokenize(language: string, actual: { tokenize(line: string, state: languages.IState): ILineTokens }, line: string, state: languages.IState): languages.TokenizationResult {\n\t\tconst actualResult = actual.tokenize(line, state);\n\t\tconst tokens = TokenizationSupportAdapter._toClassicTokens(actualResult.tokens, language);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.TokenizationResult(tokens, endState);\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, this._actual, line, state);\n\t}\n\n\tprivate _toBinaryTokens(languageIdCodec: languages.ILanguageIdCodec, tokens: IToken[]): Uint32Array {\n\t\tconst languageId = languageIdCodec.encodeLanguageId(this._languageId);\n\t\tconst tokenTheme = this._standaloneThemeService.getColorTheme().tokenTheme;\n\n\t\tconst result: number[] = [];\n\t\tlet resultLen = 0;\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tconst metadata = tokenTheme.match(languageId, t.scopes) | MetadataConsts.BALANCED_BRACKETS_MASK;\n\t\t\tif (resultLen > 0 && result[resultLen - 1] === metadata) {\n\t\t\t\t// same metadata\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[resultLen++] = startIndex;\n\t\t\tresult[resultLen++] = metadata;\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\n\t\tconst actualResult = new Uint32Array(resultLen);\n\t\tfor (let i = 0; i < resultLen; i++) {\n\t\t\tactualResult[i] = result[i];\n\t\t}\n\t\treturn actualResult;\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst actualResult = this._actual.tokenize(line, state);\n\t\tconst tokens = this._toBinaryTokens(this._languageService.languageIdCodec, actualResult.tokens);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.EncodedTokenizationResult(tokens, endState);\n\t}\n}\n\n/**\n * A token.\n */\nexport interface IToken {\n\tstartIndex: number;\n\tscopes: string;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface ILineTokens {\n\t/**\n\t * The list of tokens on the line.\n\t */\n\ttokens: IToken[];\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface IEncodedLineTokens {\n\t/**\n\t * The tokens on the line in a binary, encoded format. Each token occupies two array indices. For token i:\n\t * - at offset 2*i => startIndex\n\t * - at offset 2*i + 1 => metadata\n\t * Meta data is in binary format:\n\t * - -------------------------------------------\n\t * 3322 2222 2222 1111 1111 1100 0000 0000\n\t * 1098 7654 3210 9876 5432 1098 7654 3210\n\t * - -------------------------------------------\n\t * bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL\n\t * - -------------------------------------------\n\t * - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.\n\t * - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.\n\t * - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.\n\t * - f = foreground ColorId (9 bits)\n\t * - b = background ColorId (9 bits)\n\t * - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:\n\t * e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,\n\t * id = 1 is for the default foreground color, id = 2 for the default background.\n\t */\n\ttokens: Uint32Array;\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * A factory for token providers.\n */\nexport interface TokensProviderFactory {\n\tcreate(): languages.ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;\n}\n\n/**\n * A \"manual\" provider of tokens.\n */\nexport interface TokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize(line: string, state: languages.IState): ILineTokens;\n}\n\n/**\n * A \"manual\" provider of tokens, returning tokens in a binary form.\n */\nexport interface EncodedTokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenizeEncoded(line: string, state: languages.IState): IEncodedLineTokens;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize?(line: string, state: languages.IState): ILineTokens;\n}\n\nfunction isATokensProvider(provider: TokensProvider | EncodedTokensProvider | IMonarchLanguage): provider is TokensProvider | EncodedTokensProvider {\n\treturn (typeof provider.getInitialState === 'function');\n}\n\nfunction isEncodedTokensProvider(provider: TokensProvider | EncodedTokensProvider): provider is EncodedTokensProvider {\n\treturn 'tokenizeEncoded' in provider;\n}\n\nfunction isThenable<T>(obj: any): obj is Thenable<T> {\n\treturn obj && typeof obj.then === 'function';\n}\n\n/**\n * Change the color map that is used for token colors.\n * Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA\n */\nexport function setColorMap(colorMap: string[] | null): void {\n\tconst standaloneThemeService = StandaloneServices.get(IStandaloneThemeService);\n\tif (colorMap) {\n\t\tconst result: Color[] = [null!];\n\t\tfor (let i = 1, len = colorMap.length; i < len; i++) {\n\t\t\tresult[i] = Color.fromHex(colorMap[i]);\n\t\t}\n\t\tstandaloneThemeService.setColorMapOverride(result);\n\t} else {\n\t\tstandaloneThemeService.setColorMapOverride(null);\n\t}\n}\n\n/**\n * @internal\n */\nfunction createTokenizationSupportAdapter(languageId: string, provider: TokensProvider | EncodedTokensProvider) {\n\tif (isEncodedTokensProvider(provider)) {\n\t\treturn new EncodedTokenizationSupportAdapter(languageId, provider);\n\t} else {\n\t\treturn new TokenizationSupportAdapter(\n\t\t\tlanguageId,\n\t\t\tprovider,\n\t\t\tStandaloneServices.get(ILanguageService),\n\t\t\tStandaloneServices.get(IStandaloneThemeService),\n\t\t);\n\t}\n}\n\n/**\n * Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer\n * set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together\n * with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable {\n\tconst adaptedFactory = new languages.LazyTokenizationSupport(async () => {\n\t\tconst result = await Promise.resolve(factory.create());\n\t\tif (!result) {\n\t\t\treturn null;\n\t\t}\n\t\tif (isATokensProvider(result)) {\n\t\t\treturn createTokenizationSupportAdapter(languageId, result);\n\t\t}\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, result), StandaloneServices.get(IConfigurationService));\n\t});\n\treturn languages.TokenizationRegistry.registerFactory(languageId, adaptedFactory);\n}\n\n/**\n * Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive\n * with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,\n * but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`\n * or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set tokens provider for unknown language ${languageId}`);\n\t}\n\tif (isThenable<TokensProvider | EncodedTokensProvider>(provider)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => provider });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, createTokenizationSupportAdapter(languageId, provider));\n}\n\n/**\n * Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive\n * with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will\n * work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or\n * `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable {\n\tconst create = (languageDef: IMonarchLanguage) => {\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, languageDef), StandaloneServices.get(IConfigurationService));\n\t};\n\tif (isThenable<IMonarchLanguage>(languageDef)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => languageDef });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, create(languageDef));\n}\n\n/**\n * Register a reference provider (used by e.g. reference search).\n */\nexport function registerReferenceProvider(languageSelector: LanguageSelector, provider: languages.ReferenceProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.referenceProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a rename provider (used by e.g. rename symbol).\n */\nexport function registerRenameProvider(languageSelector: LanguageSelector, provider: languages.RenameProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.renameProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)\n */\nexport function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: languages.NewSymbolNamesProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.newSymbolNamesProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a signature help provider (used by e.g. parameter hints).\n */\nexport function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: languages.SignatureHelpProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.signatureHelpProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a hover provider (used by e.g. editor hover).\n */\nexport function registerHoverProvider(languageSelector: LanguageSelector, provider: languages.HoverProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.hoverProvider.register(languageSelector, {\n\t\tprovideHover: async (model: model.ITextModel, position: Position, token: CancellationToken, context?: languages.HoverContext<languages.Hover>): Promise<languages.Hover | undefined> => {\n\t\t\tconst word = model.getWordAtPosition(position);\n\n\t\t\treturn Promise.resolve<languages.Hover | null | undefined>(provider.provideHover(model, position, token, context)).then((value): languages.Hover | undefined => {\n\t\t\t\tif (!value) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tif (!value.range && word) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n\t\t\t\t}\n\t\t\t\tif (!value.range) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Register a document symbol provider (used by e.g. outline).\n */\nexport function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: languages.DocumentSymbolProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSymbolProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document highlight provider (used by e.g. highlight occurrences).\n */\nexport function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: languages.DocumentHighlightProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentHighlightProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an linked editing range provider.\n */\nexport function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: languages.LinkedEditingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkedEditingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a definition provider (used by e.g. go to definition).\n */\nexport function registerDefinitionProvider(languageSelector: LanguageSelector, provider: languages.DefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.definitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a implementation provider (used by e.g. go to implementation).\n */\nexport function registerImplementationProvider(languageSelector: LanguageSelector, provider: languages.ImplementationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.implementationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a type definition provider (used by e.g. go to type definition).\n */\nexport function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: languages.TypeDefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.typeDefinitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code lens provider (used by e.g. inline code lenses).\n */\nexport function registerCodeLensProvider(languageSelector: LanguageSelector, provider: languages.CodeLensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeLensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code action provider (used by e.g. quick fix).\n */\nexport function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeActionProvider.register(languageSelector, {\n\t\tprovidedCodeActionKinds: metadata?.providedCodeActionKinds,\n\t\tdocumentation: metadata?.documentation,\n\t\tprovideCodeActions: (model: model.ITextModel, range: Range, context: languages.CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList> => {\n\t\t\tconst markerService = StandaloneServices.get(IMarkerService);\n\t\t\tconst markers = markerService.read({ resource: model.uri }).filter(m => {\n\t\t\t\treturn Range.areIntersectingOrTouching(m, range);\n\t\t\t});\n\t\t\treturn provider.provideCodeActions(model, range, { markers, only: context.only, trigger: context.trigger }, token);\n\t\t},\n\t\tresolveCodeAction: provider.resolveCodeAction\n\t});\n}\n\n/**\n * Register a formatter that can handle only entire models.\n */\nexport function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter that can handle a range inside a model.\n */\nexport function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter than can do formatting as the user types.\n */\nexport function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.OnTypeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.onTypeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a link provider that can find links in text.\n */\nexport function registerLinkProvider(languageSelector: LanguageSelector, provider: languages.LinkProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a completion item provider (use by e.g. suggestions).\n */\nexport function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: languages.CompletionItemProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.completionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document color provider (used by Color Picker, Color Decorator).\n */\nexport function registerColorProvider(languageSelector: LanguageSelector, provider: languages.DocumentColorProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.colorProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a folding range provider\n */\nexport function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: languages.FoldingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.foldingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a declaration provider\n */\nexport function registerDeclarationProvider(languageSelector: LanguageSelector, provider: languages.DeclarationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.declarationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a selection range provider\n */\nexport function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: languages.SelectionRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.selectionRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inline completions provider.\n */\nexport function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: languages.InlineCompletionsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlineCompletionsProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inlay hints provider.\n */\nexport function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: languages.InlayHintsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlayHintsProvider.register(languageSelector, provider);\n}\n\n/**\n * Contains additional diagnostic information about the context in which\n * a [code action](#CodeActionProvider.provideCodeActions) is run.\n */\nexport interface CodeActionContext {\n\n\t/**\n\t * An array of diagnostics.\n\t */\n\treadonly markers: IMarkerData[];\n\n\t/**\n\t * Requested kind of actions to return.\n\t */\n\treadonly only?: string;\n\n\t/**\n\t * The reason why code actions were requested.\n\t */\n\treadonly trigger: languages.CodeActionTriggerType;\n}\n\n/**\n * The code action interface defines the contract between extensions and\n * the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.\n */\nexport interface CodeActionProvider {\n\t/**\n\t * Provide commands for the given document and range.\n\t */\n\tprovideCodeActions(model: model.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList>;\n\n\t/**\n\t * Given a code action fill in the edit. Will only invoked when missing.\n\t */\n\tresolveCodeAction?(codeAction: languages.CodeAction, token: CancellationToken): languages.ProviderResult<languages.CodeAction>;\n}\n\n\n\n/**\n * Metadata about the type of code actions that a {@link CodeActionProvider} provides.\n */\nexport interface CodeActionProviderMetadata {\n\t/**\n\t * List of code action kinds that a {@link CodeActionProvider} may return.\n\t *\n\t * This list is used to determine if a given `CodeActionProvider` should be invoked or not.\n\t * To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The\n\t * list of kinds may either be generic, such as `[\"quickfix\", \"refactor\", \"source\"]`, or list out every kind provided,\n\t * such as `[\"quickfix.removeLine\", \"source.fixAll\" ...]`.\n\t */\n\treadonly providedCodeActionKinds?: readonly string[];\n\n\treadonly documentation?: ReadonlyArray<{ readonly kind: string; readonly command: languages.Command }>;\n}\n\n/**\n * @internal\n */\nexport function createMonacoLanguagesAPI(): typeof monaco.languages {\n\treturn {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregister: <any>register,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetLanguages: <any>getLanguages,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguage: <any>onLanguage,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguageEncountered: <any>onLanguageEncountered,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetEncodedLanguageId: <any>getEncodedLanguageId,\n\n\t\t// provider methods\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetLanguageConfiguration: <any>setLanguageConfiguration,\n\t\tsetColorMap: setColorMap,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTokensProviderFactory: <any>registerTokensProviderFactory,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetTokensProvider: <any>setTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetMonarchTokensProvider: <any>setMonarchTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterReferenceProvider: <any>registerReferenceProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterRenameProvider: <any>registerRenameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterNewSymbolNameProvider: <any>registerNewSymbolNameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCompletionItemProvider: <any>registerCompletionItemProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSignatureHelpProvider: <any>registerSignatureHelpProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterHoverProvider: <any>registerHoverProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSymbolProvider: <any>registerDocumentSymbolProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentHighlightProvider: <any>registerDocumentHighlightProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkedEditingRangeProvider: <any>registerLinkedEditingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDefinitionProvider: <any>registerDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterImplementationProvider: <any>registerImplementationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTypeDefinitionProvider: <any>registerTypeDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeLensProvider: <any>registerCodeLensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeActionProvider: <any>registerCodeActionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentFormattingEditProvider: <any>registerDocumentFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeFormattingEditProvider: <any>registerDocumentRangeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterOnTypeFormattingEditProvider: <any>registerOnTypeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkProvider: <any>registerLinkProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterColorProvider: <any>registerColorProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterFoldingRangeProvider: <any>registerFoldingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDeclarationProvider: <any>registerDeclarationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSelectionRangeProvider: <any>registerSelectionRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSemanticTokensProvider: <any>registerDocumentSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeSemanticTokensProvider: <any>registerDocumentRangeSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlineCompletionsProvider: <any>registerInlineCompletionsProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlayHintsProvider: <any>registerInlayHintsProvider,\n\n\t\t// enums\n\t\tDocumentHighlightKind: standaloneEnums.DocumentHighlightKind,\n\t\tCompletionItemKind: standaloneEnums.CompletionItemKind,\n\t\tCompletionItemTag: standaloneEnums.CompletionItemTag,\n\t\tCompletionItemInsertTextRule: standaloneEnums.CompletionItemInsertTextRule,\n\t\tSymbolKind: standaloneEnums.SymbolKind,\n\t\tSymbolTag: standaloneEnums.SymbolTag,\n\t\tIndentAction: standaloneEnums.IndentAction,\n\t\tCompletionTriggerKind: standaloneEnums.CompletionTriggerKind,\n\t\tSignatureHelpTriggerKind: standaloneEnums.SignatureHelpTriggerKind,\n\t\tInlayHintKind: standaloneEnums.InlayHintKind,\n\t\tInlineCompletionTriggerKind: standaloneEnums.InlineCompletionTriggerKind,\n\t\tCodeActionTriggerType: standaloneEnums.CodeActionTriggerType,\n\t\tNewSymbolNameTag: standaloneEnums.NewSymbolNameTag,\n\t\tNewSymbolNameTriggerKind: standaloneEnums.NewSymbolNameTriggerKind,\n\t\tPartialAcceptTriggerKind: standaloneEnums.PartialAcceptTriggerKind,\n\t\tHoverVerbosityAction: standaloneEnums.HoverVerbosityAction,\n\t\tInlineCompletionEndOfLifeReasonKind: standaloneEnums.InlineCompletionEndOfLifeReasonKind,\n\t\tInlineCompletionHintStyle: standaloneEnums.InlineCompletionHintStyle,\n\n\t\t// classes\n\t\tFoldingRangeKind: languages.FoldingRangeKind,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tSelectedSuggestionInfo: <any>languages.SelectedSuggestionInfo,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tEditDeltaInfo: <any>EditDeltaInfo,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/standalone/browser/standaloneLanguages.ts","vs/editor/standalone/browser/standaloneLanguages.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAA2B,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,yDAAyD,CAAC;AACxG,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAGxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,KAAK,eAAe,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAAe,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAiC;IACzD,wDAAwD;IACxD,+DAA+D;IAC/D,aAAa,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC3B,IAAI,MAAM,GAA8B,EAAE,CAAC;IAC3C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,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AAC,wBAAwB;QAClE,wBAAwB,EAAE,eAAe,CAAC,wBAAwB;QAClE,oBAAoB,EAAE,eAAe,CAAC,oBAAoB;QAC1D,mCAAmC,EAAE,eAAe,CAAC,mCAAmC;QACxF,yBAAyB,EAAE,eAAe,CAAC,yBAAyB;QAEpE,UAAU;QACV,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;QAC5C,mDAAmD;QACnD,sBAAsB,EAAO,SAAS,CAAC,sBAAsB;QAC7D,mDAAmD;QACnD,aAAa,EAAO,aAAa;KACjC,CAAC;AACH,CAAC","file":"standaloneLanguages.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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Color } from '../../../base/common/color.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { Position } from '../../common/core/position.js';\nimport { Range } from '../../common/core/range.js';\nimport { MetadataConsts } from '../../common/encodedTokenAttributes.js';\nimport * as languages from '../../common/languages.js';\nimport { ILanguageExtensionPoint, ILanguageService } from '../../common/languages/language.js';\nimport { LanguageConfiguration } from '../../common/languages/languageConfiguration.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { ModesRegistry } from '../../common/languages/modesRegistry.js';\nimport { LanguageSelector } from '../../common/languageSelector.js';\nimport * as model from '../../common/model.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport * as standaloneEnums from '../../common/standalone/standaloneEnums.js';\nimport { StandaloneServices } from './standaloneServices.js';\nimport { compile } from '../common/monarch/monarchCompile.js';\nimport { MonarchTokenizer } from '../common/monarch/monarchLexer.js';\nimport { IMonarchLanguage } from '../common/monarch/monarchTypes.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { IMarkerData, IMarkerService } from '../../../platform/markers/common/markers.js';\nimport { EditDeltaInfo } from '../../common/textModelEditSource.js';\n\n/**\n * Register information about a new language.\n */\nexport function register(language: ILanguageExtensionPoint): void {\n\t// Intentionally using the `ModesRegistry` here to avoid\n\t// instantiating services too quickly in the standalone editor.\n\tModesRegistry.registerLanguage(language);\n}\n\n/**\n * Get the information of all the registered languages.\n */\nexport function getLanguages(): ILanguageExtensionPoint[] {\n\tlet result: ILanguageExtensionPoint[] = [];\n\tresult = result.concat(ModesRegistry.getLanguages());\n\treturn result;\n}\n\nexport function getEncodedLanguageId(languageId: string): number {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\treturn languageService.languageIdCodec.encodeLanguageId(languageId);\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model.\n * @event\n */\nexport function onLanguage(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestRichLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model or\n * when a language is encountered during the tokenization of another language.\n * @event\n */\nexport function onLanguageEncountered(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestBasicLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * Set the editing configuration for a language.\n */\nexport function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set configuration for unknown language ${languageId}`);\n\t}\n\tconst languageConfigurationService = StandaloneServices.get(ILanguageConfigurationService);\n\treturn languageConfigurationService.register(languageId, configuration, 100);\n}\n\n/**\n * @internal\n */\nexport class EncodedTokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tprivate readonly _languageId: string;\n\tprivate readonly _actual: EncodedTokensProvider;\n\n\tconstructor(languageId: string, actual: EncodedTokensProvider) {\n\t\tthis._languageId = languageId;\n\t\tthis._actual = actual;\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\tif (typeof this._actual.tokenize === 'function') {\n\t\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, <{ tokenize(line: string, state: languages.IState): ILineTokens }>this._actual, line, state);\n\t\t}\n\t\tthrow new Error('Not supported!');\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst result = this._actual.tokenizeEncoded(line, state);\n\t\treturn new languages.EncodedTokenizationResult(result.tokens, [], result.endState);\n\t}\n}\n\n/**\n * @internal\n */\nexport class TokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tconstructor(\n\t\tprivate readonly _languageId: string,\n\t\tprivate readonly _actual: TokensProvider,\n\t\tprivate readonly _languageService: ILanguageService,\n\t\tprivate readonly _standaloneThemeService: IStandaloneThemeService,\n\t) {\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tprivate static _toClassicTokens(tokens: IToken[], language: string): languages.Token[] {\n\t\tconst result: languages.Token[] = [];\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[i] = new languages.Token(startIndex, t.scopes, language);\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static adaptTokenize(language: string, actual: { tokenize(line: string, state: languages.IState): ILineTokens }, line: string, state: languages.IState): languages.TokenizationResult {\n\t\tconst actualResult = actual.tokenize(line, state);\n\t\tconst tokens = TokenizationSupportAdapter._toClassicTokens(actualResult.tokens, language);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.TokenizationResult(tokens, endState);\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, this._actual, line, state);\n\t}\n\n\tprivate _toBinaryTokens(languageIdCodec: languages.ILanguageIdCodec, tokens: IToken[]): Uint32Array {\n\t\tconst languageId = languageIdCodec.encodeLanguageId(this._languageId);\n\t\tconst tokenTheme = this._standaloneThemeService.getColorTheme().tokenTheme;\n\n\t\tconst result: number[] = [];\n\t\tlet resultLen = 0;\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tconst metadata = tokenTheme.match(languageId, t.scopes) | MetadataConsts.BALANCED_BRACKETS_MASK;\n\t\t\tif (resultLen > 0 && result[resultLen - 1] === metadata) {\n\t\t\t\t// same metadata\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[resultLen++] = startIndex;\n\t\t\tresult[resultLen++] = metadata;\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\n\t\tconst actualResult = new Uint32Array(resultLen);\n\t\tfor (let i = 0; i < resultLen; i++) {\n\t\t\tactualResult[i] = result[i];\n\t\t}\n\t\treturn actualResult;\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst actualResult = this._actual.tokenize(line, state);\n\t\tconst tokens = this._toBinaryTokens(this._languageService.languageIdCodec, actualResult.tokens);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.EncodedTokenizationResult(tokens, [], endState);\n\t}\n}\n\n/**\n * A token.\n */\nexport interface IToken {\n\tstartIndex: number;\n\tscopes: string;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface ILineTokens {\n\t/**\n\t * The list of tokens on the line.\n\t */\n\ttokens: IToken[];\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface IEncodedLineTokens {\n\t/**\n\t * The tokens on the line in a binary, encoded format. Each token occupies two array indices. For token i:\n\t * - at offset 2*i => startIndex\n\t * - at offset 2*i + 1 => metadata\n\t * Meta data is in binary format:\n\t * - -------------------------------------------\n\t * 3322 2222 2222 1111 1111 1100 0000 0000\n\t * 1098 7654 3210 9876 5432 1098 7654 3210\n\t * - -------------------------------------------\n\t * bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL\n\t * - -------------------------------------------\n\t * - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.\n\t * - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.\n\t * - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.\n\t * - f = foreground ColorId (9 bits)\n\t * - b = background ColorId (9 bits)\n\t * - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:\n\t * e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,\n\t * id = 1 is for the default foreground color, id = 2 for the default background.\n\t */\n\ttokens: Uint32Array;\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * A factory for token providers.\n */\nexport interface TokensProviderFactory {\n\tcreate(): languages.ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;\n}\n\n/**\n * A \"manual\" provider of tokens.\n */\nexport interface TokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize(line: string, state: languages.IState): ILineTokens;\n}\n\n/**\n * A \"manual\" provider of tokens, returning tokens in a binary form.\n */\nexport interface EncodedTokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenizeEncoded(line: string, state: languages.IState): IEncodedLineTokens;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize?(line: string, state: languages.IState): ILineTokens;\n}\n\nfunction isATokensProvider(provider: TokensProvider | EncodedTokensProvider | IMonarchLanguage): provider is TokensProvider | EncodedTokensProvider {\n\treturn (typeof provider.getInitialState === 'function');\n}\n\nfunction isEncodedTokensProvider(provider: TokensProvider | EncodedTokensProvider): provider is EncodedTokensProvider {\n\treturn 'tokenizeEncoded' in provider;\n}\n\nfunction isThenable<T>(obj: any): obj is Thenable<T> {\n\treturn obj && typeof obj.then === 'function';\n}\n\n/**\n * Change the color map that is used for token colors.\n * Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA\n */\nexport function setColorMap(colorMap: string[] | null): void {\n\tconst standaloneThemeService = StandaloneServices.get(IStandaloneThemeService);\n\tif (colorMap) {\n\t\tconst result: Color[] = [null!];\n\t\tfor (let i = 1, len = colorMap.length; i < len; i++) {\n\t\t\tresult[i] = Color.fromHex(colorMap[i]);\n\t\t}\n\t\tstandaloneThemeService.setColorMapOverride(result);\n\t} else {\n\t\tstandaloneThemeService.setColorMapOverride(null);\n\t}\n}\n\n/**\n * @internal\n */\nfunction createTokenizationSupportAdapter(languageId: string, provider: TokensProvider | EncodedTokensProvider) {\n\tif (isEncodedTokensProvider(provider)) {\n\t\treturn new EncodedTokenizationSupportAdapter(languageId, provider);\n\t} else {\n\t\treturn new TokenizationSupportAdapter(\n\t\t\tlanguageId,\n\t\t\tprovider,\n\t\t\tStandaloneServices.get(ILanguageService),\n\t\t\tStandaloneServices.get(IStandaloneThemeService),\n\t\t);\n\t}\n}\n\n/**\n * Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer\n * set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together\n * with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable {\n\tconst adaptedFactory = new languages.LazyTokenizationSupport(async () => {\n\t\tconst result = await Promise.resolve(factory.create());\n\t\tif (!result) {\n\t\t\treturn null;\n\t\t}\n\t\tif (isATokensProvider(result)) {\n\t\t\treturn createTokenizationSupportAdapter(languageId, result);\n\t\t}\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, result), StandaloneServices.get(IConfigurationService));\n\t});\n\treturn languages.TokenizationRegistry.registerFactory(languageId, adaptedFactory);\n}\n\n/**\n * Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive\n * with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,\n * but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`\n * or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set tokens provider for unknown language ${languageId}`);\n\t}\n\tif (isThenable<TokensProvider | EncodedTokensProvider>(provider)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => provider });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, createTokenizationSupportAdapter(languageId, provider));\n}\n\n/**\n * Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive\n * with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will\n * work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or\n * `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable {\n\tconst create = (languageDef: IMonarchLanguage) => {\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, languageDef), StandaloneServices.get(IConfigurationService));\n\t};\n\tif (isThenable<IMonarchLanguage>(languageDef)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => languageDef });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, create(languageDef));\n}\n\n/**\n * Register a reference provider (used by e.g. reference search).\n */\nexport function registerReferenceProvider(languageSelector: LanguageSelector, provider: languages.ReferenceProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.referenceProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a rename provider (used by e.g. rename symbol).\n */\nexport function registerRenameProvider(languageSelector: LanguageSelector, provider: languages.RenameProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.renameProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)\n */\nexport function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: languages.NewSymbolNamesProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.newSymbolNamesProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a signature help provider (used by e.g. parameter hints).\n */\nexport function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: languages.SignatureHelpProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.signatureHelpProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a hover provider (used by e.g. editor hover).\n */\nexport function registerHoverProvider(languageSelector: LanguageSelector, provider: languages.HoverProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.hoverProvider.register(languageSelector, {\n\t\tprovideHover: async (model: model.ITextModel, position: Position, token: CancellationToken, context?: languages.HoverContext<languages.Hover>): Promise<languages.Hover | undefined> => {\n\t\t\tconst word = model.getWordAtPosition(position);\n\n\t\t\treturn Promise.resolve<languages.Hover | null | undefined>(provider.provideHover(model, position, token, context)).then((value): languages.Hover | undefined => {\n\t\t\t\tif (!value) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tif (!value.range && word) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n\t\t\t\t}\n\t\t\t\tif (!value.range) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Register a document symbol provider (used by e.g. outline).\n */\nexport function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: languages.DocumentSymbolProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSymbolProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document highlight provider (used by e.g. highlight occurrences).\n */\nexport function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: languages.DocumentHighlightProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentHighlightProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an linked editing range provider.\n */\nexport function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: languages.LinkedEditingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkedEditingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a definition provider (used by e.g. go to definition).\n */\nexport function registerDefinitionProvider(languageSelector: LanguageSelector, provider: languages.DefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.definitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a implementation provider (used by e.g. go to implementation).\n */\nexport function registerImplementationProvider(languageSelector: LanguageSelector, provider: languages.ImplementationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.implementationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a type definition provider (used by e.g. go to type definition).\n */\nexport function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: languages.TypeDefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.typeDefinitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code lens provider (used by e.g. inline code lenses).\n */\nexport function registerCodeLensProvider(languageSelector: LanguageSelector, provider: languages.CodeLensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeLensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code action provider (used by e.g. quick fix).\n */\nexport function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeActionProvider.register(languageSelector, {\n\t\tprovidedCodeActionKinds: metadata?.providedCodeActionKinds,\n\t\tdocumentation: metadata?.documentation,\n\t\tprovideCodeActions: (model: model.ITextModel, range: Range, context: languages.CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList> => {\n\t\t\tconst markerService = StandaloneServices.get(IMarkerService);\n\t\t\tconst markers = markerService.read({ resource: model.uri }).filter(m => {\n\t\t\t\treturn Range.areIntersectingOrTouching(m, range);\n\t\t\t});\n\t\t\treturn provider.provideCodeActions(model, range, { markers, only: context.only, trigger: context.trigger }, token);\n\t\t},\n\t\tresolveCodeAction: provider.resolveCodeAction\n\t});\n}\n\n/**\n * Register a formatter that can handle only entire models.\n */\nexport function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter that can handle a range inside a model.\n */\nexport function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter than can do formatting as the user types.\n */\nexport function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.OnTypeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.onTypeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a link provider that can find links in text.\n */\nexport function registerLinkProvider(languageSelector: LanguageSelector, provider: languages.LinkProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a completion item provider (use by e.g. suggestions).\n */\nexport function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: languages.CompletionItemProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.completionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document color provider (used by Color Picker, Color Decorator).\n */\nexport function registerColorProvider(languageSelector: LanguageSelector, provider: languages.DocumentColorProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.colorProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a folding range provider\n */\nexport function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: languages.FoldingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.foldingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a declaration provider\n */\nexport function registerDeclarationProvider(languageSelector: LanguageSelector, provider: languages.DeclarationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.declarationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a selection range provider\n */\nexport function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: languages.SelectionRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.selectionRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inline completions provider.\n */\nexport function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: languages.InlineCompletionsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlineCompletionsProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inlay hints provider.\n */\nexport function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: languages.InlayHintsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlayHintsProvider.register(languageSelector, provider);\n}\n\n/**\n * Contains additional diagnostic information about the context in which\n * a [code action](#CodeActionProvider.provideCodeActions) is run.\n */\nexport interface CodeActionContext {\n\n\t/**\n\t * An array of diagnostics.\n\t */\n\treadonly markers: IMarkerData[];\n\n\t/**\n\t * Requested kind of actions to return.\n\t */\n\treadonly only?: string;\n\n\t/**\n\t * The reason why code actions were requested.\n\t */\n\treadonly trigger: languages.CodeActionTriggerType;\n}\n\n/**\n * The code action interface defines the contract between extensions and\n * the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.\n */\nexport interface CodeActionProvider {\n\t/**\n\t * Provide commands for the given document and range.\n\t */\n\tprovideCodeActions(model: model.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList>;\n\n\t/**\n\t * Given a code action fill in the edit. Will only invoked when missing.\n\t */\n\tresolveCodeAction?(codeAction: languages.CodeAction, token: CancellationToken): languages.ProviderResult<languages.CodeAction>;\n}\n\n\n\n/**\n * Metadata about the type of code actions that a {@link CodeActionProvider} provides.\n */\nexport interface CodeActionProviderMetadata {\n\t/**\n\t * List of code action kinds that a {@link CodeActionProvider} may return.\n\t *\n\t * This list is used to determine if a given `CodeActionProvider` should be invoked or not.\n\t * To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The\n\t * list of kinds may either be generic, such as `[\"quickfix\", \"refactor\", \"source\"]`, or list out every kind provided,\n\t * such as `[\"quickfix.removeLine\", \"source.fixAll\" ...]`.\n\t */\n\treadonly providedCodeActionKinds?: readonly string[];\n\n\treadonly documentation?: ReadonlyArray<{ readonly kind: string; readonly command: languages.Command }>;\n}\n\n/**\n * @internal\n */\nexport function createMonacoLanguagesAPI(): typeof monaco.languages {\n\treturn {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregister: <any>register,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetLanguages: <any>getLanguages,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguage: <any>onLanguage,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguageEncountered: <any>onLanguageEncountered,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetEncodedLanguageId: <any>getEncodedLanguageId,\n\n\t\t// provider methods\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetLanguageConfiguration: <any>setLanguageConfiguration,\n\t\tsetColorMap: setColorMap,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTokensProviderFactory: <any>registerTokensProviderFactory,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetTokensProvider: <any>setTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetMonarchTokensProvider: <any>setMonarchTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterReferenceProvider: <any>registerReferenceProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterRenameProvider: <any>registerRenameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterNewSymbolNameProvider: <any>registerNewSymbolNameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCompletionItemProvider: <any>registerCompletionItemProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSignatureHelpProvider: <any>registerSignatureHelpProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterHoverProvider: <any>registerHoverProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSymbolProvider: <any>registerDocumentSymbolProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentHighlightProvider: <any>registerDocumentHighlightProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkedEditingRangeProvider: <any>registerLinkedEditingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDefinitionProvider: <any>registerDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterImplementationProvider: <any>registerImplementationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTypeDefinitionProvider: <any>registerTypeDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeLensProvider: <any>registerCodeLensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeActionProvider: <any>registerCodeActionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentFormattingEditProvider: <any>registerDocumentFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeFormattingEditProvider: <any>registerDocumentRangeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterOnTypeFormattingEditProvider: <any>registerOnTypeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkProvider: <any>registerLinkProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterColorProvider: <any>registerColorProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterFoldingRangeProvider: <any>registerFoldingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDeclarationProvider: <any>registerDeclarationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSelectionRangeProvider: <any>registerSelectionRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSemanticTokensProvider: <any>registerDocumentSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeSemanticTokensProvider: <any>registerDocumentRangeSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlineCompletionsProvider: <any>registerInlineCompletionsProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlayHintsProvider: <any>registerInlayHintsProvider,\n\n\t\t// enums\n\t\tDocumentHighlightKind: standaloneEnums.DocumentHighlightKind,\n\t\tCompletionItemKind: standaloneEnums.CompletionItemKind,\n\t\tCompletionItemTag: standaloneEnums.CompletionItemTag,\n\t\tCompletionItemInsertTextRule: standaloneEnums.CompletionItemInsertTextRule,\n\t\tSymbolKind: standaloneEnums.SymbolKind,\n\t\tSymbolTag: standaloneEnums.SymbolTag,\n\t\tIndentAction: standaloneEnums.IndentAction,\n\t\tCompletionTriggerKind: standaloneEnums.CompletionTriggerKind,\n\t\tSignatureHelpTriggerKind: standaloneEnums.SignatureHelpTriggerKind,\n\t\tInlayHintKind: standaloneEnums.InlayHintKind,\n\t\tInlineCompletionTriggerKind: standaloneEnums.InlineCompletionTriggerKind,\n\t\tCodeActionTriggerType: standaloneEnums.CodeActionTriggerType,\n\t\tNewSymbolNameTag: standaloneEnums.NewSymbolNameTag,\n\t\tNewSymbolNameTriggerKind: standaloneEnums.NewSymbolNameTriggerKind,\n\t\tPartialAcceptTriggerKind: standaloneEnums.PartialAcceptTriggerKind,\n\t\tHoverVerbosityAction: standaloneEnums.HoverVerbosityAction,\n\t\tInlineCompletionEndOfLifeReasonKind: standaloneEnums.InlineCompletionEndOfLifeReasonKind,\n\t\tInlineCompletionHintStyle: standaloneEnums.InlineCompletionHintStyle,\n\n\t\t// classes\n\t\tFoldingRangeKind: languages.FoldingRangeKind,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tSelectedSuggestionInfo: <any>languages.SelectedSuggestionInfo,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tEditDeltaInfo: <any>EditDeltaInfo,\n\t};\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 { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Color } from '../../../base/common/color.js';\nimport { IDisposable } from '../../../base/common/lifecycle.js';\nimport { Position } from '../../common/core/position.js';\nimport { Range } from '../../common/core/range.js';\nimport { MetadataConsts } from '../../common/encodedTokenAttributes.js';\nimport * as languages from '../../common/languages.js';\nimport { ILanguageExtensionPoint, ILanguageService } from '../../common/languages/language.js';\nimport { LanguageConfiguration } from '../../common/languages/languageConfiguration.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { ModesRegistry } from '../../common/languages/modesRegistry.js';\nimport { LanguageSelector } from '../../common/languageSelector.js';\nimport * as model from '../../common/model.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport * as standaloneEnums from '../../common/standalone/standaloneEnums.js';\nimport { StandaloneServices } from './standaloneServices.js';\nimport { compile } from '../common/monarch/monarchCompile.js';\nimport { MonarchTokenizer } from '../common/monarch/monarchLexer.js';\nimport { IMonarchLanguage } from '../common/monarch/monarchTypes.js';\nimport { IStandaloneThemeService } from '../common/standaloneTheme.js';\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\nimport { IMarkerData, IMarkerService } from '../../../platform/markers/common/markers.js';\nimport { EditDeltaInfo } from '../../common/textModelEditSource.js';\n\n/**\n * Register information about a new language.\n */\nexport function register(language: ILanguageExtensionPoint): void {\n\t// Intentionally using the `ModesRegistry` here to avoid\n\t// instantiating services too quickly in the standalone editor.\n\tModesRegistry.registerLanguage(language);\n}\n\n/**\n * Get the information of all the registered languages.\n */\nexport function getLanguages(): ILanguageExtensionPoint[] {\n\tlet result: ILanguageExtensionPoint[] = [];\n\tresult = result.concat(ModesRegistry.getLanguages());\n\treturn result;\n}\n\nexport function getEncodedLanguageId(languageId: string): number {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\treturn languageService.languageIdCodec.encodeLanguageId(languageId);\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model.\n * @event\n */\nexport function onLanguage(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestRichLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * An event emitted when a language is associated for the first time with a text model or\n * when a language is encountered during the tokenization of another language.\n * @event\n */\nexport function onLanguageEncountered(languageId: string, callback: () => void): IDisposable {\n\treturn StandaloneServices.withServices(() => {\n\t\tconst languageService = StandaloneServices.get(ILanguageService);\n\t\tconst disposable = languageService.onDidRequestBasicLanguageFeatures((encounteredLanguageId) => {\n\t\t\tif (encounteredLanguageId === languageId) {\n\t\t\t\t// stop listening\n\t\t\t\tdisposable.dispose();\n\t\t\t\t// invoke actual listener\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\t\treturn disposable;\n\t});\n}\n\n/**\n * Set the editing configuration for a language.\n */\nexport function setLanguageConfiguration(languageId: string, configuration: LanguageConfiguration): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set configuration for unknown language ${languageId}`);\n\t}\n\tconst languageConfigurationService = StandaloneServices.get(ILanguageConfigurationService);\n\treturn languageConfigurationService.register(languageId, configuration, 100);\n}\n\n/**\n * @internal\n */\nexport class EncodedTokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tprivate readonly _languageId: string;\n\tprivate readonly _actual: EncodedTokensProvider;\n\n\tconstructor(languageId: string, actual: EncodedTokensProvider) {\n\t\tthis._languageId = languageId;\n\t\tthis._actual = actual;\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\tif (typeof this._actual.tokenize === 'function') {\n\t\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, <{ tokenize(line: string, state: languages.IState): ILineTokens }>this._actual, line, state);\n\t\t}\n\t\tthrow new Error('Not supported!');\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst result = this._actual.tokenizeEncoded(line, state);\n\t\treturn new languages.EncodedTokenizationResult(result.tokens, [], result.endState);\n\t}\n}\n\n/**\n * @internal\n */\nexport class TokenizationSupportAdapter implements languages.ITokenizationSupport, IDisposable {\n\n\tconstructor(\n\t\tprivate readonly _languageId: string,\n\t\tprivate readonly _actual: TokensProvider,\n\t\tprivate readonly _languageService: ILanguageService,\n\t\tprivate readonly _standaloneThemeService: IStandaloneThemeService,\n\t) {\n\t}\n\n\tdispose(): void {\n\t\t// NOOP\n\t}\n\n\tpublic getInitialState(): languages.IState {\n\t\treturn this._actual.getInitialState();\n\t}\n\n\tprivate static _toClassicTokens(tokens: IToken[], language: string): languages.Token[] {\n\t\tconst result: languages.Token[] = [];\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[i] = new languages.Token(startIndex, t.scopes, language);\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static adaptTokenize(language: string, actual: { tokenize(line: string, state: languages.IState): ILineTokens }, line: string, state: languages.IState): languages.TokenizationResult {\n\t\tconst actualResult = actual.tokenize(line, state);\n\t\tconst tokens = TokenizationSupportAdapter._toClassicTokens(actualResult.tokens, language);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.TokenizationResult(tokens, endState);\n\t}\n\n\tpublic tokenize(line: string, hasEOL: boolean, state: languages.IState): languages.TokenizationResult {\n\t\treturn TokenizationSupportAdapter.adaptTokenize(this._languageId, this._actual, line, state);\n\t}\n\n\tprivate _toBinaryTokens(languageIdCodec: languages.ILanguageIdCodec, tokens: IToken[]): Uint32Array {\n\t\tconst languageId = languageIdCodec.encodeLanguageId(this._languageId);\n\t\tconst tokenTheme = this._standaloneThemeService.getColorTheme().tokenTheme;\n\n\t\tconst result: number[] = [];\n\t\tlet resultLen = 0;\n\t\tlet previousStartIndex: number = 0;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst t = tokens[i];\n\t\t\tconst metadata = tokenTheme.match(languageId, t.scopes) | MetadataConsts.BALANCED_BRACKETS_MASK;\n\t\t\tif (resultLen > 0 && result[resultLen - 1] === metadata) {\n\t\t\t\t// same metadata\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet startIndex = t.startIndex;\n\n\t\t\t// Prevent issues stemming from a buggy external tokenizer.\n\t\t\tif (i === 0) {\n\t\t\t\t// Force first token to start at first index!\n\t\t\t\tstartIndex = 0;\n\t\t\t} else if (startIndex < previousStartIndex) {\n\t\t\t\t// Force tokens to be after one another!\n\t\t\t\tstartIndex = previousStartIndex;\n\t\t\t}\n\n\t\t\tresult[resultLen++] = startIndex;\n\t\t\tresult[resultLen++] = metadata;\n\n\t\t\tpreviousStartIndex = startIndex;\n\t\t}\n\n\t\tconst actualResult = new Uint32Array(resultLen);\n\t\tfor (let i = 0; i < resultLen; i++) {\n\t\t\tactualResult[i] = result[i];\n\t\t}\n\t\treturn actualResult;\n\t}\n\n\tpublic tokenizeEncoded(line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult {\n\t\tconst actualResult = this._actual.tokenize(line, state);\n\t\tconst tokens = this._toBinaryTokens(this._languageService.languageIdCodec, actualResult.tokens);\n\n\t\tlet endState: languages.IState;\n\t\t// try to save an object if possible\n\t\tif (actualResult.endState.equals(state)) {\n\t\t\tendState = state;\n\t\t} else {\n\t\t\tendState = actualResult.endState;\n\t\t}\n\n\t\treturn new languages.EncodedTokenizationResult(tokens, [], endState);\n\t}\n}\n\n/**\n * A token.\n */\nexport interface IToken {\n\tstartIndex: number;\n\tscopes: string;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface ILineTokens {\n\t/**\n\t * The list of tokens on the line.\n\t */\n\ttokens: IToken[];\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * The result of a line tokenization.\n */\nexport interface IEncodedLineTokens {\n\t/**\n\t * The tokens on the line in a binary, encoded format. Each token occupies two array indices. For token i:\n\t * - at offset 2*i => startIndex\n\t * - at offset 2*i + 1 => metadata\n\t * Meta data is in binary format:\n\t * - -------------------------------------------\n\t * 3322 2222 2222 1111 1111 1100 0000 0000\n\t * 1098 7654 3210 9876 5432 1098 7654 3210\n\t * - -------------------------------------------\n\t * bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL\n\t * - -------------------------------------------\n\t * - L = EncodedLanguageId (8 bits): Use `getEncodedLanguageId` to get the encoded ID of a language.\n\t * - T = StandardTokenType (2 bits): Other = 0, Comment = 1, String = 2, RegEx = 3.\n\t * - F = FontStyle (4 bits): None = 0, Italic = 1, Bold = 2, Underline = 4, Strikethrough = 8.\n\t * - f = foreground ColorId (9 bits)\n\t * - b = background ColorId (9 bits)\n\t * - The color value for each colorId is defined in IStandaloneThemeData.customTokenColors:\n\t * e.g. colorId = 1 is stored in IStandaloneThemeData.customTokenColors[1]. Color id = 0 means no color,\n\t * id = 1 is for the default foreground color, id = 2 for the default background.\n\t */\n\ttokens: Uint32Array;\n\t/**\n\t * The tokenization end state.\n\t * A pointer will be held to this and the object should not be modified by the tokenizer after the pointer is returned.\n\t */\n\tendState: languages.IState;\n}\n\n/**\n * A factory for token providers.\n */\nexport interface TokensProviderFactory {\n\tcreate(): languages.ProviderResult<TokensProvider | EncodedTokensProvider | IMonarchLanguage>;\n}\n\n/**\n * A \"manual\" provider of tokens.\n */\nexport interface TokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize(line: string, state: languages.IState): ILineTokens;\n}\n\n/**\n * A \"manual\" provider of tokens, returning tokens in a binary form.\n */\nexport interface EncodedTokensProvider {\n\t/**\n\t * The initial state of a language. Will be the state passed in to tokenize the first line.\n\t */\n\tgetInitialState(): languages.IState;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenizeEncoded(line: string, state: languages.IState): IEncodedLineTokens;\n\t/**\n\t * Tokenize a line given the state at the beginning of the line.\n\t */\n\ttokenize?(line: string, state: languages.IState): ILineTokens;\n}\n\nfunction isATokensProvider(provider: TokensProvider | EncodedTokensProvider | IMonarchLanguage): provider is TokensProvider | EncodedTokensProvider {\n\treturn (typeof provider.getInitialState === 'function');\n}\n\nfunction isEncodedTokensProvider(provider: TokensProvider | EncodedTokensProvider): provider is EncodedTokensProvider {\n\treturn 'tokenizeEncoded' in provider;\n}\n\nfunction isThenable<T>(obj: any): obj is Thenable<T> {\n\treturn obj && typeof obj.then === 'function';\n}\n\n/**\n * Change the color map that is used for token colors.\n * Supported formats (hex): #RRGGBB, $RRGGBBAA, #RGB, #RGBA\n */\nexport function setColorMap(colorMap: string[] | null): void {\n\tconst standaloneThemeService = StandaloneServices.get(IStandaloneThemeService);\n\tif (colorMap) {\n\t\tconst result: Color[] = [null!];\n\t\tfor (let i = 1, len = colorMap.length; i < len; i++) {\n\t\t\tresult[i] = Color.fromHex(colorMap[i]);\n\t\t}\n\t\tstandaloneThemeService.setColorMapOverride(result);\n\t} else {\n\t\tstandaloneThemeService.setColorMapOverride(null);\n\t}\n}\n\n/**\n * @internal\n */\nfunction createTokenizationSupportAdapter(languageId: string, provider: TokensProvider | EncodedTokensProvider) {\n\tif (isEncodedTokensProvider(provider)) {\n\t\treturn new EncodedTokenizationSupportAdapter(languageId, provider);\n\t} else {\n\t\treturn new TokenizationSupportAdapter(\n\t\t\tlanguageId,\n\t\t\tprovider,\n\t\t\tStandaloneServices.get(ILanguageService),\n\t\t\tStandaloneServices.get(IStandaloneThemeService),\n\t\t);\n\t}\n}\n\n/**\n * Register a tokens provider factory for a language. This tokenizer will be exclusive with a tokenizer\n * set using `setTokensProvider` or one created using `setMonarchTokensProvider`, but will work together\n * with a tokens provider set using `registerDocumentSemanticTokensProvider` or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function registerTokensProviderFactory(languageId: string, factory: TokensProviderFactory): IDisposable {\n\tconst adaptedFactory = new languages.LazyTokenizationSupport(async () => {\n\t\tconst result = await Promise.resolve(factory.create());\n\t\tif (!result) {\n\t\t\treturn null;\n\t\t}\n\t\tif (isATokensProvider(result)) {\n\t\t\treturn createTokenizationSupportAdapter(languageId, result);\n\t\t}\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, result), StandaloneServices.get(IConfigurationService));\n\t});\n\treturn languages.TokenizationRegistry.registerFactory(languageId, adaptedFactory);\n}\n\n/**\n * Set the tokens provider for a language (manual implementation). This tokenizer will be exclusive\n * with a tokenizer created using `setMonarchTokensProvider`, or with `registerTokensProviderFactory`,\n * but will work together with a tokens provider set using `registerDocumentSemanticTokensProvider`\n * or `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setTokensProvider(languageId: string, provider: TokensProvider | EncodedTokensProvider | Thenable<TokensProvider | EncodedTokensProvider>): IDisposable {\n\tconst languageService = StandaloneServices.get(ILanguageService);\n\tif (!languageService.isRegisteredLanguageId(languageId)) {\n\t\tthrow new Error(`Cannot set tokens provider for unknown language ${languageId}`);\n\t}\n\tif (isThenable<TokensProvider | EncodedTokensProvider>(provider)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => provider });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, createTokenizationSupportAdapter(languageId, provider));\n}\n\n/**\n * Set the tokens provider for a language (monarch implementation). This tokenizer will be exclusive\n * with a tokenizer set using `setTokensProvider`, or with `registerTokensProviderFactory`, but will\n * work together with a tokens provider set using `registerDocumentSemanticTokensProvider` or\n * `registerDocumentRangeSemanticTokensProvider`.\n */\nexport function setMonarchTokensProvider(languageId: string, languageDef: IMonarchLanguage | Thenable<IMonarchLanguage>): IDisposable {\n\tconst create = (languageDef: IMonarchLanguage) => {\n\t\treturn new MonarchTokenizer(StandaloneServices.get(ILanguageService), StandaloneServices.get(IStandaloneThemeService), languageId, compile(languageId, languageDef), StandaloneServices.get(IConfigurationService));\n\t};\n\tif (isThenable<IMonarchLanguage>(languageDef)) {\n\t\treturn registerTokensProviderFactory(languageId, { create: () => languageDef });\n\t}\n\treturn languages.TokenizationRegistry.register(languageId, create(languageDef));\n}\n\n/**\n * Register a reference provider (used by e.g. reference search).\n */\nexport function registerReferenceProvider(languageSelector: LanguageSelector, provider: languages.ReferenceProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.referenceProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a rename provider (used by e.g. rename symbol).\n */\nexport function registerRenameProvider(languageSelector: LanguageSelector, provider: languages.RenameProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.renameProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a new symbol-name provider (e.g., when a symbol is being renamed, show new possible symbol-names)\n */\nexport function registerNewSymbolNameProvider(languageSelector: LanguageSelector, provider: languages.NewSymbolNamesProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.newSymbolNamesProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a signature help provider (used by e.g. parameter hints).\n */\nexport function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: languages.SignatureHelpProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.signatureHelpProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a hover provider (used by e.g. editor hover).\n */\nexport function registerHoverProvider(languageSelector: LanguageSelector, provider: languages.HoverProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.hoverProvider.register(languageSelector, {\n\t\tprovideHover: async (model: model.ITextModel, position: Position, token: CancellationToken, context?: languages.HoverContext<languages.Hover>): Promise<languages.Hover | undefined> => {\n\t\t\tconst word = model.getWordAtPosition(position);\n\n\t\t\treturn Promise.resolve<languages.Hover | null | undefined>(provider.provideHover(model, position, token, context)).then((value): languages.Hover | undefined => {\n\t\t\t\tif (!value) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tif (!value.range && word) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n\t\t\t\t}\n\t\t\t\tif (!value.range) {\n\t\t\t\t\tvalue.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Register a document symbol provider (used by e.g. outline).\n */\nexport function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: languages.DocumentSymbolProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSymbolProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document highlight provider (used by e.g. highlight occurrences).\n */\nexport function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: languages.DocumentHighlightProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentHighlightProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an linked editing range provider.\n */\nexport function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: languages.LinkedEditingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkedEditingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a definition provider (used by e.g. go to definition).\n */\nexport function registerDefinitionProvider(languageSelector: LanguageSelector, provider: languages.DefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.definitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a implementation provider (used by e.g. go to implementation).\n */\nexport function registerImplementationProvider(languageSelector: LanguageSelector, provider: languages.ImplementationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.implementationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a type definition provider (used by e.g. go to type definition).\n */\nexport function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: languages.TypeDefinitionProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.typeDefinitionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code lens provider (used by e.g. inline code lenses).\n */\nexport function registerCodeLensProvider(languageSelector: LanguageSelector, provider: languages.CodeLensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeLensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a code action provider (used by e.g. quick fix).\n */\nexport function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.codeActionProvider.register(languageSelector, {\n\t\tprovidedCodeActionKinds: metadata?.providedCodeActionKinds,\n\t\tdocumentation: metadata?.documentation,\n\t\tprovideCodeActions: (model: model.ITextModel, range: Range, context: languages.CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList> => {\n\t\t\tconst markerService = StandaloneServices.get(IMarkerService);\n\t\t\tconst markers = markerService.read({ resource: model.uri }).filter(m => {\n\t\t\t\treturn Range.areIntersectingOrTouching(m, range);\n\t\t\t});\n\t\t\treturn provider.provideCodeActions(model, range, { markers, only: context.only, trigger: context.trigger }, token);\n\t\t},\n\t\tresolveCodeAction: provider.resolveCodeAction\n\t});\n}\n\n/**\n * Register a formatter that can handle only entire models.\n */\nexport function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter that can handle a range inside a model.\n */\nexport function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a formatter than can do formatting as the user types.\n */\nexport function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: languages.OnTypeFormattingEditProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.onTypeFormattingEditProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a link provider that can find links in text.\n */\nexport function registerLinkProvider(languageSelector: LanguageSelector, provider: languages.LinkProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.linkProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a completion item provider (use by e.g. suggestions).\n */\nexport function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: languages.CompletionItemProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.completionProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document color provider (used by Color Picker, Color Decorator).\n */\nexport function registerColorProvider(languageSelector: LanguageSelector, provider: languages.DocumentColorProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.colorProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a folding range provider\n */\nexport function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: languages.FoldingRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.foldingRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a declaration provider\n */\nexport function registerDeclarationProvider(languageSelector: LanguageSelector, provider: languages.DeclarationProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.declarationProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a selection range provider\n */\nexport function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: languages.SelectionRangeProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.selectionRangeProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a\n * simple top-down tokenizer. Simple top-down tokenizers can be set either via `setMonarchTokensProvider`\n * or `setTokensProvider`.\n *\n * For the best user experience, register both a semantic tokens provider and a top-down tokenizer.\n */\nexport function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: languages.DocumentRangeSemanticTokensProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.documentRangeSemanticTokensProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inline completions provider.\n */\nexport function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: languages.InlineCompletionsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlineCompletionsProvider.register(languageSelector, provider);\n}\n\n/**\n * Register an inlay hints provider.\n */\nexport function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: languages.InlayHintsProvider): IDisposable {\n\tconst languageFeaturesService = StandaloneServices.get(ILanguageFeaturesService);\n\treturn languageFeaturesService.inlayHintsProvider.register(languageSelector, provider);\n}\n\n/**\n * Contains additional diagnostic information about the context in which\n * a [code action](#CodeActionProvider.provideCodeActions) is run.\n */\nexport interface CodeActionContext {\n\n\t/**\n\t * An array of diagnostics.\n\t */\n\treadonly markers: IMarkerData[];\n\n\t/**\n\t * Requested kind of actions to return.\n\t */\n\treadonly only?: string;\n\n\t/**\n\t * The reason why code actions were requested.\n\t */\n\treadonly trigger: languages.CodeActionTriggerType;\n}\n\n/**\n * The code action interface defines the contract between extensions and\n * the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.\n */\nexport interface CodeActionProvider {\n\t/**\n\t * Provide commands for the given document and range.\n\t */\n\tprovideCodeActions(model: model.ITextModel, range: Range, context: CodeActionContext, token: CancellationToken): languages.ProviderResult<languages.CodeActionList>;\n\n\t/**\n\t * Given a code action fill in the edit. Will only invoked when missing.\n\t */\n\tresolveCodeAction?(codeAction: languages.CodeAction, token: CancellationToken): languages.ProviderResult<languages.CodeAction>;\n}\n\n\n\n/**\n * Metadata about the type of code actions that a {@link CodeActionProvider} provides.\n */\nexport interface CodeActionProviderMetadata {\n\t/**\n\t * List of code action kinds that a {@link CodeActionProvider} may return.\n\t *\n\t * This list is used to determine if a given `CodeActionProvider` should be invoked or not.\n\t * To avoid unnecessary computation, every `CodeActionProvider` should list use `providedCodeActionKinds`. The\n\t * list of kinds may either be generic, such as `[\"quickfix\", \"refactor\", \"source\"]`, or list out every kind provided,\n\t * such as `[\"quickfix.removeLine\", \"source.fixAll\" ...]`.\n\t */\n\treadonly providedCodeActionKinds?: readonly string[];\n\n\treadonly documentation?: ReadonlyArray<{ readonly kind: string; readonly command: languages.Command }>;\n}\n\n/**\n * @internal\n */\nexport function createMonacoLanguagesAPI(): typeof monaco.languages {\n\treturn {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregister: <any>register,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetLanguages: <any>getLanguages,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguage: <any>onLanguage,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tonLanguageEncountered: <any>onLanguageEncountered,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tgetEncodedLanguageId: <any>getEncodedLanguageId,\n\n\t\t// provider methods\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetLanguageConfiguration: <any>setLanguageConfiguration,\n\t\tsetColorMap: setColorMap,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTokensProviderFactory: <any>registerTokensProviderFactory,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetTokensProvider: <any>setTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tsetMonarchTokensProvider: <any>setMonarchTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterReferenceProvider: <any>registerReferenceProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterRenameProvider: <any>registerRenameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterNewSymbolNameProvider: <any>registerNewSymbolNameProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCompletionItemProvider: <any>registerCompletionItemProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSignatureHelpProvider: <any>registerSignatureHelpProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterHoverProvider: <any>registerHoverProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSymbolProvider: <any>registerDocumentSymbolProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentHighlightProvider: <any>registerDocumentHighlightProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkedEditingRangeProvider: <any>registerLinkedEditingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDefinitionProvider: <any>registerDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterImplementationProvider: <any>registerImplementationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterTypeDefinitionProvider: <any>registerTypeDefinitionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeLensProvider: <any>registerCodeLensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterCodeActionProvider: <any>registerCodeActionProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentFormattingEditProvider: <any>registerDocumentFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeFormattingEditProvider: <any>registerDocumentRangeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterOnTypeFormattingEditProvider: <any>registerOnTypeFormattingEditProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterLinkProvider: <any>registerLinkProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterColorProvider: <any>registerColorProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterFoldingRangeProvider: <any>registerFoldingRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDeclarationProvider: <any>registerDeclarationProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterSelectionRangeProvider: <any>registerSelectionRangeProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentSemanticTokensProvider: <any>registerDocumentSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterDocumentRangeSemanticTokensProvider: <any>registerDocumentRangeSemanticTokensProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlineCompletionsProvider: <any>registerInlineCompletionsProvider,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tregisterInlayHintsProvider: <any>registerInlayHintsProvider,\n\n\t\t// enums\n\t\tDocumentHighlightKind: standaloneEnums.DocumentHighlightKind,\n\t\tCompletionItemKind: standaloneEnums.CompletionItemKind,\n\t\tCompletionItemTag: standaloneEnums.CompletionItemTag,\n\t\tCompletionItemInsertTextRule: standaloneEnums.CompletionItemInsertTextRule,\n\t\tSymbolKind: standaloneEnums.SymbolKind,\n\t\tSymbolTag: standaloneEnums.SymbolTag,\n\t\tIndentAction: standaloneEnums.IndentAction,\n\t\tCompletionTriggerKind: standaloneEnums.CompletionTriggerKind,\n\t\tSignatureHelpTriggerKind: standaloneEnums.SignatureHelpTriggerKind,\n\t\tInlayHintKind: standaloneEnums.InlayHintKind,\n\t\tInlineCompletionTriggerKind: standaloneEnums.InlineCompletionTriggerKind,\n\t\tCodeActionTriggerType: standaloneEnums.CodeActionTriggerType,\n\t\tNewSymbolNameTag: standaloneEnums.NewSymbolNameTag,\n\t\tNewSymbolNameTriggerKind: standaloneEnums.NewSymbolNameTriggerKind,\n\t\tPartialAcceptTriggerKind: standaloneEnums.PartialAcceptTriggerKind,\n\t\tHoverVerbosityAction: standaloneEnums.HoverVerbosityAction,\n\t\tInlineCompletionEndOfLifeReasonKind: standaloneEnums.InlineCompletionEndOfLifeReasonKind,\n\t\tInlineCompletionHintStyle: standaloneEnums.InlineCompletionHintStyle,\n\n\t\t// classes\n\t\tFoldingRangeKind: languages.FoldingRangeKind,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tSelectedSuggestionInfo: <any>languages.SelectedSuggestionInfo,\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tEditDeltaInfo: <any>EditDeltaInfo,\n\t};\n}\n"]}
@@ -22,7 +22,7 @@ import '../../browser/services/inlineCompletionsService.js';
22
22
  import * as strings from '../../../base/common/strings.js';
23
23
  import * as dom from '../../../base/browser/dom.js';
24
24
  import { StandardKeyboardEvent } from '../../../base/browser/keyboardEvent.js';
25
- import { Emitter } from '../../../base/common/event.js';
25
+ import { Emitter, Event } from '../../../base/common/event.js';
26
26
  import { KeyCodeChord, decodeKeybinding } from '../../../base/common/keybindings.js';
27
27
  import { ImmortalReference, toDisposable, DisposableStore, Disposable, combinedDisposable } from '../../../base/common/lifecycle.js';
28
28
  import { OS, isLinux, isMacintosh } from '../../../base/common/platform.js';
@@ -101,6 +101,7 @@ import { StandaloneTreeSitterLibraryService } from './standaloneTreeSitterLibrar
101
101
  import { IDataChannelService, NullDataChannelService } from '../../../platform/dataChannel/common/dataChannel.js';
102
102
  import { IWebWorkerService } from '../../../platform/webWorker/browser/webWorkerService.js';
103
103
  import { StandaloneWebWorkerService } from './services/standaloneWebWorkerService.js';
104
+ import { IDefaultAccountService } from '../../../platform/defaultAccount/common/defaultAccount.js';
104
105
  class SimpleModel {
105
106
  constructor(model) {
106
107
  this.disposed = false;
@@ -648,6 +649,14 @@ class StandaloneAccessbilitySignalService {
648
649
  async playSignal(cue, options) {
649
650
  }
650
651
  }
652
+ class StandaloneDefaultAccountService {
653
+ constructor() {
654
+ this.onDidChangeDefaultAccount = Event.None;
655
+ }
656
+ async getDefaultAccount() {
657
+ return null;
658
+ }
659
+ }
651
660
  registerSingleton(IWebWorkerService, StandaloneWebWorkerService, 0 /* InstantiationType.Eager */);
652
661
  registerSingleton(ILogService, StandaloneLogService, 0 /* InstantiationType.Eager */);
653
662
  registerSingleton(IConfigurationService, StandaloneConfigurationService, 0 /* InstantiationType.Eager */);
@@ -685,6 +694,7 @@ registerSingleton(IAccessibilitySignalService, StandaloneAccessbilitySignalServi
685
694
  registerSingleton(ITreeSitterLibraryService, StandaloneTreeSitterLibraryService, 0 /* InstantiationType.Eager */);
686
695
  registerSingleton(ILoggerService, NullLoggerService, 0 /* InstantiationType.Eager */);
687
696
  registerSingleton(IDataChannelService, NullDataChannelService, 0 /* InstantiationType.Eager */);
697
+ registerSingleton(IDefaultAccountService, StandaloneDefaultAccountService, 0 /* InstantiationType.Eager */);
688
698
  /**
689
699
  * We don't want to eagerly instantiate services because embedders get a one time chance
690
700
  * to override services when they create the first editor.