@codingame/monaco-vscode-api 1.78.8 → 1.79.0

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 (641) hide show
  1. package/README.md +2 -1
  2. package/dist/activity.d.ts +2902 -0
  3. package/dist/api.js +6 -5
  4. package/dist/assets/activityaction.css +224 -0
  5. package/dist/assets/activitybarpart.css +65 -0
  6. package/dist/assets/basepanelpart.css +221 -0
  7. package/dist/assets/callHierarchy.css +62 -0
  8. package/dist/assets/{sidebysideeditor.css → compositepart.css} +10 -2
  9. package/dist/assets/debugViewlet.css +337 -0
  10. package/dist/assets/explorerviewlet.css +129 -0
  11. package/dist/assets/hover.css +127 -0
  12. package/dist/assets/interactiveSession.css +340 -0
  13. package/dist/assets/menubar.css +111 -0
  14. package/dist/assets/menubarControl.css +61 -0
  15. package/dist/assets/notificationsCenter.css +3 -3
  16. package/dist/assets/panelpart.css +75 -0
  17. package/dist/assets/part.css +109 -0
  18. package/dist/assets/repl.css +145 -0
  19. package/dist/assets/sidebarpart.css +61 -0
  20. package/dist/assets/tunnelView.css +107 -0
  21. package/dist/assets/typeHierarchy.css +62 -0
  22. package/dist/assets/views.css +297 -0
  23. package/dist/collections.d.ts +7 -0
  24. package/dist/colorRegistry.d.ts +710 -0
  25. package/dist/contextkey.d.ts +330 -0
  26. package/dist/debugProtocol.d.ts +2343 -0
  27. package/dist/default-extensions/bat.js +5 -4
  28. package/dist/default-extensions/clojure.js +4 -3
  29. package/dist/default-extensions/coffeescript.js +5 -4
  30. package/dist/default-extensions/cpp.js +10 -9
  31. package/dist/default-extensions/csharp.js +5 -4
  32. package/dist/default-extensions/css.js +4 -3
  33. package/dist/default-extensions/dart.js +4 -3
  34. package/dist/default-extensions/diff.js +4 -3
  35. package/dist/default-extensions/docker.js +4 -3
  36. package/dist/default-extensions/fsharp.js +5 -4
  37. package/dist/default-extensions/go.js +4 -3
  38. package/dist/default-extensions/groovy.js +5 -4
  39. package/dist/default-extensions/handlebars.js +4 -3
  40. package/dist/default-extensions/hlsl.js +4 -3
  41. package/dist/default-extensions/html.js +6 -5
  42. package/dist/default-extensions/ini.js +5 -4
  43. package/dist/default-extensions/java.js +5 -4
  44. package/dist/default-extensions/javascript.js +8 -7
  45. package/dist/default-extensions/json.js +5 -4
  46. package/dist/default-extensions/julia.js +4 -3
  47. package/dist/default-extensions/latex.js +10 -9
  48. package/dist/default-extensions/less.js +4 -3
  49. package/dist/default-extensions/log.js +3 -2
  50. package/dist/default-extensions/lua.js +4 -3
  51. package/dist/default-extensions/make.js +4 -3
  52. package/dist/default-extensions/markdown-basics.js +5 -4
  53. package/dist/default-extensions/objective-c.js +5 -4
  54. package/dist/default-extensions/perl.js +6 -5
  55. package/dist/default-extensions/php.js +6 -5
  56. package/dist/default-extensions/powershell.js +4 -3
  57. package/dist/default-extensions/pug.js +4 -3
  58. package/dist/default-extensions/python.js +5 -4
  59. package/dist/default-extensions/r.js +4 -3
  60. package/dist/default-extensions/razor.js +4 -3
  61. package/dist/default-extensions/references-view.js +8 -0
  62. package/dist/default-extensions/ruby.js +4 -3
  63. package/dist/default-extensions/rust.js +4 -3
  64. package/dist/default-extensions/scss.js +5 -4
  65. package/dist/default-extensions/shaderlab.js +4 -3
  66. package/dist/default-extensions/shellscript.js +4 -3
  67. package/dist/default-extensions/sql.js +4 -3
  68. package/dist/default-extensions/swift.js +5 -4
  69. package/dist/default-extensions/theme-abyss.js +3 -2
  70. package/dist/default-extensions/theme-defaults.js +31 -10
  71. package/dist/default-extensions/theme-kimbie-dark.js +3 -2
  72. package/dist/default-extensions/theme-monokai-dimmed.js +3 -2
  73. package/dist/default-extensions/theme-monokai.js +3 -2
  74. package/dist/default-extensions/theme-quietlight.js +3 -2
  75. package/dist/default-extensions/theme-red.js +3 -2
  76. package/dist/default-extensions/theme-seti.js +5 -2
  77. package/dist/default-extensions/theme-solarized-dark.js +3 -2
  78. package/dist/default-extensions/theme-solarized-light.js +3 -2
  79. package/dist/default-extensions/theme-tomorrow-night-blue.js +3 -2
  80. package/dist/default-extensions/typescript-basics.js +8 -7
  81. package/dist/default-extensions/vb.js +5 -4
  82. package/dist/default-extensions/xml.js +6 -5
  83. package/dist/default-extensions/yaml.js +4 -3
  84. package/dist/editor.d.ts +322 -0
  85. package/dist/editorBrowser.d.ts +3128 -0
  86. package/dist/event.d.ts +581 -0
  87. package/dist/extension-tools-d0cfdea1.js +25603 -0
  88. package/dist/extensions.d.ts +20 -829
  89. package/dist/extensions.d2.ts +457 -0
  90. package/dist/extensions.js +100 -5
  91. package/dist/extensionsRegistry.d.ts +239 -0
  92. package/dist/files.d.ts +853 -0
  93. package/dist/instantiation.d.ts +59 -0
  94. package/dist/jsonSchema.d.ts +90 -0
  95. package/dist/keybinding.d.ts +622 -0
  96. package/dist/languageFeatures.d.ts +4762 -0
  97. package/dist/log.d.ts +150 -0
  98. package/dist/monaco.d.ts +42 -5195
  99. package/dist/override/vs/workbench/contrib/files/browser/views/openEditorsView.js +2 -0
  100. package/dist/rollup-extension-directory-plugin.d.ts +5 -2
  101. package/dist/rollup-extension-directory-plugin.js +74 -46
  102. package/dist/rollup-vsix-plugin.d.ts +4 -2
  103. package/dist/rollup-vsix-plugin.js +57 -19
  104. package/dist/service-override/audioCue.d.ts +4 -19
  105. package/dist/service-override/configuration.d.ts +10 -628
  106. package/dist/service-override/configuration.js +16 -4
  107. package/dist/service-override/debug.d.ts +4 -19
  108. package/dist/service-override/dialogs.d.ts +3 -3
  109. package/dist/service-override/files.d.ts +53 -818
  110. package/dist/service-override/files.js +37 -15
  111. package/dist/service-override/keybindings.d.ts +9 -11
  112. package/dist/service-override/languages.d.ts +4 -74
  113. package/dist/service-override/layout.js +80 -6
  114. package/dist/service-override/modelEditor.d.ts +9 -557
  115. package/dist/service-override/modelEditor.js +5 -3
  116. package/dist/service-override/notifications.d.ts +3 -3
  117. package/dist/service-override/preferences.d.ts +3 -3
  118. package/dist/service-override/snippets.d.ts +3 -3
  119. package/dist/service-override/textmate.d.ts +3 -11
  120. package/dist/service-override/theme.d.ts +4 -16
  121. package/dist/service-override/views.d.ts +502 -0
  122. package/dist/service-override/views.js +177 -0
  123. package/dist/services.d.ts +1946 -16903
  124. package/dist/services.js +3 -0
  125. package/dist/standaloneServices.d.ts +14 -0
  126. package/dist/themables.d.ts +28 -0
  127. package/dist/uri.d.ts +151 -0
  128. package/dist/vscode/vs/base/browser/ui/menu/menubar.js +831 -0
  129. package/dist/vscode/vs/base/browser/ui/splitview/paneview.js +151 -2
  130. package/dist/vscode/vs/base/browser/ui/tree/treeDefaults.js +14 -0
  131. package/dist/vscode/vs/platform/backup/common/backup.js +7 -0
  132. package/dist/vscode/vs/platform/configuration/common/configurationRegistry.js +10 -0
  133. package/dist/vscode/vs/platform/credentials/common/credentials.js +3 -0
  134. package/dist/vscode/vs/platform/extensionManagement/common/extensionManagementUtil.js +4 -1
  135. package/dist/vscode/vs/platform/extensionManagement/common/extensionStorage.js +174 -0
  136. package/dist/vscode/vs/platform/files/common/fileService.js +2 -11
  137. package/dist/vscode/vs/platform/files/common/files.js +28 -0
  138. package/dist/vscode/vs/platform/files/common/io.js +2 -7
  139. package/dist/vscode/vs/platform/languagePacks/common/languagePacks.js +3 -0
  140. package/dist/vscode/vs/platform/remote/common/remoteAuthorityResolver.js +3 -1
  141. package/dist/vscode/vs/platform/storage/common/storage.js +332 -0
  142. package/dist/vscode/vs/platform/telemetry/common/telemetryUtils.js +2 -1
  143. package/dist/vscode/vs/platform/tunnel/common/tunnel.js +29 -1
  144. package/dist/vscode/vs/platform/update/common/update.js +3 -0
  145. package/dist/vscode/vs/platform/window/common/window.js +33 -0
  146. package/dist/vscode/vs/workbench/api/browser/mainThreadBulkEdits.js +18 -1
  147. package/dist/vscode/vs/workbench/api/browser/mainThreadDebugService.js +21 -0
  148. package/dist/vscode/vs/workbench/api/browser/mainThreadExtensionService.js +1 -1
  149. package/dist/vscode/vs/workbench/api/browser/mainThreadLanguageFeatures.js +13 -10
  150. package/dist/vscode/vs/workbench/api/browser/mainThreadLocalization.js +33 -0
  151. package/dist/vscode/vs/workbench/api/browser/mainThreadStorage.js +69 -0
  152. package/dist/vscode/vs/workbench/api/browser/mainThreadTreeViews.js +300 -0
  153. package/dist/vscode/vs/workbench/api/browser/mainThreadWorkspace.js +21 -1
  154. package/dist/vscode/vs/workbench/api/browser/viewsExtensionPoint.js +699 -0
  155. package/dist/vscode/vs/workbench/api/common/extHost.protocol.js +5 -1
  156. package/dist/vscode/vs/workbench/api/common/extHostConfiguration.js +13 -8
  157. package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +31 -0
  158. package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +4 -4
  159. package/dist/vscode/vs/workbench/api/common/extHostLanguageFeatures.js +54 -43
  160. package/dist/vscode/vs/workbench/api/common/extHostTreeViews.js +823 -0
  161. package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +33 -13
  162. package/dist/vscode/vs/workbench/api/common/extHostTypes.js +29 -1
  163. package/dist/vscode/vs/workbench/api/common/extHostVariableResolverService.js +3 -3
  164. package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +8 -0
  165. package/dist/vscode/vs/workbench/api/common/shared/dataTransferCache.js +1 -1
  166. package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +318 -0
  167. package/dist/vscode/vs/workbench/browser/actions/listCommands.js +602 -0
  168. package/dist/vscode/vs/workbench/browser/actions/windowActions.js +271 -0
  169. package/dist/vscode/vs/workbench/browser/actions/workspaceActions.js +250 -0
  170. package/dist/vscode/vs/workbench/browser/actions/workspaceCommands.js +6 -0
  171. package/dist/vscode/vs/workbench/browser/composite.js +49 -1
  172. package/dist/vscode/vs/workbench/browser/dnd.js +395 -0
  173. package/dist/vscode/vs/workbench/browser/labels.js +426 -0
  174. package/dist/vscode/vs/workbench/browser/panecomposite.js +158 -0
  175. package/dist/vscode/vs/workbench/browser/part.js +84 -0
  176. package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarActions.js +582 -0
  177. package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarPart.js +784 -0
  178. package/dist/vscode/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +146 -0
  179. package/dist/vscode/vs/workbench/browser/parts/compositeBar.js +687 -0
  180. package/dist/vscode/vs/workbench/browser/parts/compositeBarActions.js +578 -0
  181. package/dist/vscode/vs/workbench/browser/parts/compositePart.js +319 -0
  182. package/dist/vscode/vs/workbench/browser/parts/editor/editorActions.js +7 -7
  183. package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +4 -1121
  184. package/dist/vscode/vs/workbench/browser/parts/panel/panelActions.js +381 -0
  185. package/dist/vscode/vs/workbench/browser/parts/panel/panelPart.js +753 -0
  186. package/dist/vscode/vs/workbench/browser/parts/sidebar/sidebarPart.js +217 -0
  187. package/dist/vscode/vs/workbench/browser/parts/titlebar/menubarControl.js +600 -0
  188. package/dist/vscode/vs/workbench/browser/parts/views/checkbox.js +80 -0
  189. package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +1475 -0
  190. package/dist/vscode/vs/workbench/browser/parts/views/viewFilter.js +181 -0
  191. package/dist/vscode/vs/workbench/browser/parts/views/viewPane.js +50 -2
  192. package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1020 -0
  193. package/dist/vscode/vs/workbench/browser/parts/views/viewsService.js +562 -0
  194. package/dist/vscode/vs/workbench/browser/parts/views/viewsViewlet.js +109 -0
  195. package/dist/vscode/vs/workbench/browser/style.js +43 -0
  196. package/dist/vscode/vs/workbench/common/activity.js +3 -0
  197. package/dist/vscode/vs/workbench/common/contextkeys.js +31 -9
  198. package/dist/vscode/vs/workbench/common/editor/textEditorModel.js +7 -8
  199. package/dist/vscode/vs/workbench/common/editor.js +1 -47
  200. package/dist/vscode/vs/workbench/common/theme.js +38 -25
  201. package/dist/vscode/vs/workbench/common/views.js +280 -1
  202. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits.js +62 -1
  203. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +305 -0
  204. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkFileEdits.js +373 -0
  205. package/dist/vscode/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.js +257 -0
  206. package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +259 -0
  207. package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +337 -0
  208. package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +119 -0
  209. package/dist/vscode/vs/workbench/contrib/debug/browser/baseDebugView.js +8 -2
  210. package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +12 -4
  211. package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointWidget.js +5 -0
  212. package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointsView.js +585 -8
  213. package/dist/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +5 -1
  214. package/dist/vscode/vs/workbench/contrib/debug/browser/callStackView.js +954 -0
  215. package/dist/vscode/vs/workbench/contrib/debug/browser/debug.contribution.js +151 -145
  216. package/dist/vscode/vs/workbench/contrib/debug/browser/debugANSIHandling.js +345 -0
  217. package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +79 -3
  218. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorActions.js +522 -0
  219. package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +10 -9
  220. package/dist/vscode/vs/workbench/contrib/debug/browser/debugHover.js +15 -7
  221. package/dist/vscode/vs/workbench/contrib/debug/browser/debugIcons.js +28 -1
  222. package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +72 -65
  223. package/dist/vscode/vs/workbench/contrib/debug/browser/debugViewlet.js +166 -0
  224. package/dist/vscode/vs/workbench/contrib/debug/browser/linkDetector.js +10 -10
  225. package/dist/vscode/vs/workbench/contrib/debug/browser/loadedScriptsView.js +629 -0
  226. package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +908 -0
  227. package/dist/vscode/vs/workbench/contrib/debug/browser/replFilter.js +46 -0
  228. package/dist/vscode/vs/workbench/contrib/debug/browser/replViewer.js +330 -0
  229. package/dist/vscode/vs/workbench/contrib/debug/browser/variablesView.js +295 -10
  230. package/dist/vscode/vs/workbench/contrib/debug/browser/watchExpressionsView.js +411 -0
  231. package/dist/vscode/vs/workbench/contrib/debug/browser/welcomeView.js +85 -0
  232. package/dist/vscode/vs/workbench/contrib/debug/common/debug.js +98 -1
  233. package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +10 -1
  234. package/dist/vscode/vs/workbench/contrib/debug/common/debugViewModel.js +9 -1
  235. package/dist/vscode/vs/workbench/contrib/debug/common/replModel.js +51 -1
  236. package/dist/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +3 -0
  237. package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +254 -0
  238. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +207 -0
  239. package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +1119 -0
  240. package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +595 -0
  241. package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +26 -0
  242. package/dist/vscode/vs/workbench/contrib/files/browser/fileImportExport.js +708 -0
  243. package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +368 -13
  244. package/dist/vscode/vs/workbench/contrib/files/browser/files.js +88 -1
  245. package/dist/vscode/vs/workbench/contrib/files/browser/views/emptyView.js +88 -0
  246. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +73 -0
  247. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerView.js +796 -0
  248. package/dist/vscode/vs/workbench/contrib/files/browser/views/explorerViewer.js +1209 -0
  249. package/dist/vscode/vs/workbench/contrib/files/common/files.js +194 -3
  250. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionFollowups.js +30 -0
  251. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +196 -0
  252. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.js +622 -0
  253. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.js +77 -0
  254. package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +311 -0
  255. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +48 -0
  256. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +8 -0
  257. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionViewModel.js +207 -0
  258. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWidgetHistoryService.js +3 -0
  259. package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionWordCounter.js +25 -0
  260. package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +27 -0
  261. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookCommon.js +79 -1
  262. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput.js +249 -0
  263. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.js +3 -0
  264. package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +10 -0
  265. package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +117 -19
  266. package/dist/vscode/vs/workbench/contrib/remote/browser/remoteExplorer.js +186 -0
  267. package/dist/vscode/vs/workbench/contrib/remote/browser/remoteIcons.js +23 -0
  268. package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +1636 -0
  269. package/dist/vscode/vs/workbench/contrib/scm/common/scm.js +2 -0
  270. package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +167 -0
  271. package/dist/vscode/vs/workbench/contrib/testing/common/testId.js +5 -2
  272. package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +244 -0
  273. package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +332 -0
  274. package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +117 -0
  275. package/dist/vscode/vs/workbench/contrib/webview/browser/webview.js +41 -0
  276. package/dist/vscode/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +20 -0
  277. package/dist/vscode/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +231 -0
  278. package/dist/vscode/vs/workbench/contrib/webviewView/browser/webviewViewService.js +3 -0
  279. package/dist/vscode/vs/workbench/services/actions/common/menusExtensionPoint.js +179 -1
  280. package/dist/vscode/vs/workbench/services/activity/browser/activityService.js +94 -0
  281. package/dist/vscode/vs/workbench/services/activity/common/activity.js +15 -1
  282. package/dist/vscode/vs/workbench/services/authentication/browser/authenticationService.js +35 -0
  283. package/dist/vscode/vs/workbench/services/authentication/common/authentication.js +3 -0
  284. package/dist/vscode/vs/workbench/services/configuration/browser/configuration.js +1 -1
  285. package/dist/vscode/vs/workbench/services/configurationResolver/common/variableResolver.js +13 -13
  286. package/dist/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +3 -3
  287. package/dist/vscode/vs/workbench/services/extensions/common/extensionStorageMigration.js +56 -0
  288. package/dist/vscode/vs/workbench/services/extensions/common/extensions.js +1 -1
  289. package/dist/vscode/vs/workbench/services/extensions/common/extensionsApiProposals.js +8 -0
  290. package/dist/vscode/vs/workbench/services/hover/browser/hover.js +3 -0
  291. package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +149 -0
  292. package/dist/vscode/vs/workbench/services/hover/browser/hoverWidget.js +514 -0
  293. package/dist/vscode/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.js +29 -29
  294. package/dist/vscode/vs/workbench/services/keybinding/common/windowsKeyboardMapper.js +11 -11
  295. package/dist/vscode/vs/workbench/services/language/common/languageService.js +1 -1
  296. package/dist/vscode/vs/workbench/services/layout/browser/layoutService.js +9 -1
  297. package/dist/vscode/vs/workbench/services/remote/common/remoteExplorerService.js +782 -0
  298. package/dist/vscode/vs/workbench/services/search/common/ignoreFile.js +102 -0
  299. package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +26 -8
  300. package/dist/vscode/vs/workbench/services/search/common/search.js +4 -3
  301. package/dist/vscode/vs/workbench/services/semanticSimilarity/common/semanticSimilarityService.js +3 -0
  302. package/dist/vscode/vs/workbench/services/textMate/browser/workerHost/textMateWorkerTokenizerController.js +6 -10
  303. package/dist/vscode/vs/workbench/services/textfile/common/textfiles.js +1 -1
  304. package/dist/vscode/vs/workbench/services/themes/browser/fileIconThemeData.js +2 -2
  305. package/dist/vscode/vs/workbench/services/themes/browser/productIconThemeData.js +4 -5
  306. package/dist/vscode/vs/workbench/services/themes/browser/workbenchThemeService.js +16 -10
  307. package/dist/vscode/vs/workbench/services/themes/common/themeConfiguration.js +36 -38
  308. package/dist/vscode/vs/workbench/services/themes/common/themeExtensionPoints.js +4 -8
  309. package/dist/vscode/vs/workbench/services/themes/common/workbenchThemeService.js +22 -1
  310. package/dist/vscode/vs/workbench/services/views/browser/treeViewsService.js +3 -0
  311. package/dist/vscode/vs/workbench/services/views/browser/viewDescriptorService.js +688 -0
  312. package/dist/vscode/vs/workbench/services/views/common/treeViewsService.js +20 -0
  313. package/dist/vscode/vs/workbench/services/views/common/viewContainerModel.js +613 -0
  314. package/dist/vscode-default-extensions/bat/language-configuration.json.extensionResource.js +2 -0
  315. package/dist/vscode-default-extensions/bat/snippets/batchfile.code-snippets.extensionResource.js +2 -0
  316. package/dist/vscode-default-extensions/bat/syntaxes/batchfile.tmLanguage.json.extensionResource.js +2 -0
  317. package/dist/vscode-default-extensions/clojure/language-configuration.json.extensionResource.js +2 -0
  318. package/dist/vscode-default-extensions/clojure/syntaxes/clojure.tmLanguage.json.extensionResource.js +2 -0
  319. package/dist/vscode-default-extensions/coffeescript/language-configuration.json.extensionResource.js +2 -0
  320. package/dist/vscode-default-extensions/coffeescript/snippets/coffeescript.code-snippets.extensionResource.js +2 -0
  321. package/dist/vscode-default-extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json.extensionResource.js +2 -0
  322. package/dist/vscode-default-extensions/cpp/language-configuration.json.extensionResource.js +2 -0
  323. package/dist/vscode-default-extensions/cpp/snippets/c.code-snippets.extensionResource.js +2 -0
  324. package/dist/vscode-default-extensions/cpp/snippets/cpp.code-snippets.extensionResource.js +2 -0
  325. package/dist/vscode-default-extensions/cpp/syntaxes/c.tmLanguage.json.extensionResource.js +2 -0
  326. package/dist/vscode-default-extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json.extensionResource.js +2 -0
  327. package/dist/vscode-default-extensions/cpp/syntaxes/cpp.tmLanguage.json.extensionResource.js +2 -0
  328. package/dist/vscode-default-extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json.extensionResource.js +2 -0
  329. package/dist/vscode-default-extensions/cpp/syntaxes/{platform.tmLanguage.json.js → platform.tmLanguage.json.extensionResource.js} +2 -2
  330. package/dist/vscode-default-extensions/csharp/language-configuration.json.extensionResource.js +2 -0
  331. package/dist/vscode-default-extensions/csharp/snippets/csharp.code-snippets.extensionResource.js +2 -0
  332. package/dist/vscode-default-extensions/csharp/syntaxes/csharp.tmLanguage.json.extensionResource.js +2 -0
  333. package/dist/vscode-default-extensions/css/language-configuration.json.extensionResource.js +2 -0
  334. package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.extensionResource.js +2 -0
  335. package/dist/vscode-default-extensions/dart/language-configuration.json.extensionResource.js +2 -0
  336. package/dist/vscode-default-extensions/dart/syntaxes/dart.tmLanguage.json.extensionResource.js +2 -0
  337. package/dist/vscode-default-extensions/diff/language-configuration.json.extensionResource.js +2 -0
  338. package/dist/vscode-default-extensions/diff/syntaxes/diff.tmLanguage.json.extensionResource.js +2 -0
  339. package/dist/vscode-default-extensions/docker/language-configuration.json.extensionResource.js +2 -0
  340. package/dist/vscode-default-extensions/docker/syntaxes/docker.tmLanguage.json.extensionResource.js +2 -0
  341. package/dist/vscode-default-extensions/fsharp/language-configuration.json.extensionResource.js +2 -0
  342. package/dist/vscode-default-extensions/fsharp/snippets/fsharp.code-snippets.extensionResource.js +2 -0
  343. package/dist/vscode-default-extensions/fsharp/syntaxes/fsharp.tmLanguage.json.extensionResource.js +2 -0
  344. package/dist/vscode-default-extensions/go/language-configuration.json.extensionResource.js +2 -0
  345. package/dist/vscode-default-extensions/go/syntaxes/go.tmLanguage.json.extensionResource.js +2 -0
  346. package/dist/vscode-default-extensions/groovy/language-configuration.json.extensionResource.js +2 -0
  347. package/dist/vscode-default-extensions/groovy/snippets/groovy.code-snippets.extensionResource.js +2 -0
  348. package/dist/vscode-default-extensions/groovy/syntaxes/groovy.tmLanguage.json.extensionResource.js +2 -0
  349. package/dist/vscode-default-extensions/handlebars/language-configuration.json.extensionResource.js +2 -0
  350. package/dist/vscode-default-extensions/handlebars/syntaxes/Handlebars.tmLanguage.json.extensionResource.js +2 -0
  351. package/dist/vscode-default-extensions/hlsl/language-configuration.json.extensionResource.js +2 -0
  352. package/dist/vscode-default-extensions/hlsl/syntaxes/hlsl.tmLanguage.json.extensionResource.js +2 -0
  353. package/dist/vscode-default-extensions/html/language-configuration.json.extensionResource.js +2 -0
  354. package/dist/vscode-default-extensions/html/snippets/html.code-snippets.extensionResource.js +2 -0
  355. package/dist/vscode-default-extensions/html/syntaxes/html-derivative.tmLanguage.json.extensionResource.js +2 -0
  356. package/dist/vscode-default-extensions/html/syntaxes/html.tmLanguage.json.extensionResource.js +2 -0
  357. package/dist/vscode-default-extensions/ini/ini.language-configuration.json.extensionResource.js +2 -0
  358. package/dist/vscode-default-extensions/ini/properties.language-configuration.json.extensionResource.js +2 -0
  359. package/dist/vscode-default-extensions/ini/syntaxes/ini.tmLanguage.json.extensionResource.js +2 -0
  360. package/dist/vscode-default-extensions/java/language-configuration.json.extensionResource.js +2 -0
  361. package/dist/vscode-default-extensions/java/snippets/java.code-snippets.extensionResource.js +2 -0
  362. package/dist/vscode-default-extensions/java/syntaxes/java.tmLanguage.json.extensionResource.js +2 -0
  363. package/dist/vscode-default-extensions/javascript/javascript-language-configuration.json.extensionResource.js +2 -0
  364. package/dist/vscode-default-extensions/javascript/snippets/javascript.code-snippets.extensionResource.js +2 -0
  365. package/dist/vscode-default-extensions/javascript/syntaxes/JavaScript.tmLanguage.json.extensionResource.js +2 -0
  366. package/dist/vscode-default-extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json.extensionResource.js +2 -0
  367. package/dist/vscode-default-extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage.extensionResource.js +2 -0
  368. package/dist/vscode-default-extensions/javascript/tags-language-configuration.json.extensionResource.js +2 -0
  369. package/dist/vscode-default-extensions/json/language-configuration.json.extensionResource.js +2 -0
  370. package/dist/vscode-default-extensions/json/syntaxes/JSON.tmLanguage.json.extensionResource.js +2 -0
  371. package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.extensionResource.js +2 -0
  372. package/dist/vscode-default-extensions/julia/language-configuration.json.extensionResource.js +2 -0
  373. package/dist/vscode-default-extensions/julia/syntaxes/julia.tmLanguage.json.extensionResource.js +2 -0
  374. package/dist/vscode-default-extensions/latex/latex-cpp-embedded-language-configuration.json.extensionResource.js +2 -0
  375. package/dist/vscode-default-extensions/latex/latex-language-configuration.json.extensionResource.js +2 -0
  376. package/dist/vscode-default-extensions/latex/markdown-latex-combined-language-configuration.json.extensionResource.js +2 -0
  377. package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.extensionResource.js +2 -0
  378. package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.extensionResource.js +2 -0
  379. package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.extensionResource.js +2 -0
  380. package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.extensionResource.js +2 -0
  381. package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.extensionResource.js +2 -0
  382. package/dist/vscode-default-extensions/less/language-configuration.json.extensionResource.js +2 -0
  383. package/dist/vscode-default-extensions/less/syntaxes/less.tmLanguage.json.extensionResource.js +2 -0
  384. package/dist/vscode-default-extensions/log/syntaxes/log.tmLanguage.json.extensionResource.js +2 -0
  385. package/dist/vscode-default-extensions/lua/language-configuration.json.extensionResource.js +2 -0
  386. package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.extensionResource.js +2 -0
  387. package/dist/vscode-default-extensions/make/language-configuration.json.extensionResource.js +2 -0
  388. package/dist/vscode-default-extensions/make/syntaxes/make.tmLanguage.json.extensionResource.js +2 -0
  389. package/dist/vscode-default-extensions/markdown-basics/language-configuration.json.extensionResource.js +2 -0
  390. package/dist/vscode-default-extensions/markdown-basics/snippets/markdown.code-snippets.extensionResource.js +2 -0
  391. package/dist/vscode-default-extensions/markdown-basics/syntaxes/markdown.tmLanguage.json.extensionResource.js +2 -0
  392. package/dist/vscode-default-extensions/objective-c/language-configuration.json.extensionResource.js +2 -0
  393. package/dist/vscode-default-extensions/objective-c/syntaxes/objective-c.tmLanguage.json.extensionResource.js +2 -0
  394. package/dist/vscode-default-extensions/objective-c/syntaxes/objective-c__.tmLanguage.json.extensionResource.js +2 -0
  395. package/dist/vscode-default-extensions/perl/perl.language-configuration.json.extensionResource.js +2 -0
  396. package/dist/vscode-default-extensions/perl/perl6.language-configuration.json.extensionResource.js +2 -0
  397. package/dist/vscode-default-extensions/perl/syntaxes/perl.tmLanguage.json.extensionResource.js +2 -0
  398. package/dist/vscode-default-extensions/perl/syntaxes/perl6.tmLanguage.json.extensionResource.js +2 -0
  399. package/dist/vscode-default-extensions/php/language-configuration.json.extensionResource.js +2 -0
  400. package/dist/vscode-default-extensions/php/snippets/php.code-snippets.extensionResource.js +2 -0
  401. package/dist/vscode-default-extensions/php/syntaxes/html.tmLanguage.json.extensionResource.js +2 -0
  402. package/dist/vscode-default-extensions/php/syntaxes/php.tmLanguage.json.extensionResource.js +2 -0
  403. package/dist/vscode-default-extensions/powershell/language-configuration.json.extensionResource.js +2 -0
  404. package/dist/vscode-default-extensions/powershell/syntaxes/powershell.tmLanguage.json.extensionResource.js +2 -0
  405. package/dist/vscode-default-extensions/pug/language-configuration.json.extensionResource.js +2 -0
  406. package/dist/vscode-default-extensions/pug/syntaxes/pug.tmLanguage.json.extensionResource.js +2 -0
  407. package/dist/vscode-default-extensions/python/language-configuration.json.extensionResource.js +2 -0
  408. package/dist/vscode-default-extensions/python/syntaxes/MagicPython.tmLanguage.json.extensionResource.js +2 -0
  409. package/dist/vscode-default-extensions/python/syntaxes/MagicRegExp.tmLanguage.json.extensionResource.js +2 -0
  410. package/dist/vscode-default-extensions/r/language-configuration.json.extensionResource.js +2 -0
  411. package/dist/vscode-default-extensions/r/syntaxes/r.tmLanguage.json.extensionResource.js +2 -0
  412. package/dist/vscode-default-extensions/razor/language-configuration.json.extensionResource.js +2 -0
  413. package/dist/vscode-default-extensions/razor/syntaxes/cshtml.tmLanguage.json.extensionResource.js +2 -0
  414. package/dist/vscode-default-extensions/references-view/dist/extension.js.extensionResource.js +2 -0
  415. package/dist/vscode-default-extensions/references-view/package.json.js +2 -0
  416. package/dist/vscode-default-extensions/ruby/language-configuration.json.extensionResource.js +2 -0
  417. package/dist/vscode-default-extensions/ruby/syntaxes/ruby.tmLanguage.json.extensionResource.js +2 -0
  418. package/dist/vscode-default-extensions/rust/language-configuration.json.extensionResource.js +2 -0
  419. package/dist/vscode-default-extensions/rust/syntaxes/rust.tmLanguage.json.extensionResource.js +2 -0
  420. package/dist/vscode-default-extensions/scss/language-configuration.json.extensionResource.js +2 -0
  421. package/dist/vscode-default-extensions/scss/syntaxes/sassdoc.tmLanguage.json.extensionResource.js +2 -0
  422. package/dist/vscode-default-extensions/scss/syntaxes/scss.tmLanguage.json.extensionResource.js +2 -0
  423. package/dist/vscode-default-extensions/shaderlab/language-configuration.json.extensionResource.js +2 -0
  424. package/dist/vscode-default-extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json.extensionResource.js +2 -0
  425. package/dist/vscode-default-extensions/shellscript/language-configuration.json.extensionResource.js +2 -0
  426. package/dist/vscode-default-extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json.extensionResource.js +2 -0
  427. package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +2 -0
  428. package/dist/vscode-default-extensions/sql/syntaxes/sql.tmLanguage.json.extensionResource.js +2 -0
  429. package/dist/vscode-default-extensions/swift/language-configuration.json.extensionResource.js +2 -0
  430. package/dist/vscode-default-extensions/swift/snippets/swift.code-snippets.extensionResource.js +2 -0
  431. package/dist/vscode-default-extensions/swift/syntaxes/swift.tmLanguage.json.extensionResource.js +2 -0
  432. package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.extensionResource.js +2 -0
  433. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/document-dark.svg.extensionResource.js +2 -0
  434. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/document-light.svg.extensionResource.js +2 -0
  435. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/folder-dark.svg.extensionResource.js +2 -0
  436. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/folder-light.svg.extensionResource.js +2 -0
  437. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/folder-open-dark.svg.extensionResource.js +2 -0
  438. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/folder-open-light.svg.extensionResource.js +2 -0
  439. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/root-folder-dark.svg.extensionResource.js +2 -0
  440. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/root-folder-light.svg.extensionResource.js +2 -0
  441. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/root-folder-open-dark.svg.extensionResource.js +2 -0
  442. package/dist/vscode-default-extensions/theme-defaults/fileicons/images/root-folder-open-light.svg.extensionResource.js +2 -0
  443. package/dist/vscode-default-extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json.extensionResource.js +2 -0
  444. package/dist/vscode-default-extensions/theme-defaults/package.json.js +1 -1
  445. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus.json.extensionResource.js +2 -0
  446. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.extensionResource.js +2 -0
  447. package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.extensionResource.js +2 -0
  448. package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.extensionResource.js +2 -0
  449. package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.extensionResource.js +2 -0
  450. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus.json.extensionResource.js +2 -0
  451. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.extensionResource.js +2 -0
  452. package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.extensionResource.js +2 -0
  453. package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.extensionResource.js +2 -0
  454. package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.extensionResource.js +2 -0
  455. package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.extensionResource.js +2 -0
  456. package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.extensionResource.js +2 -0
  457. package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.extensionResource.js +2 -0
  458. package/dist/vscode-default-extensions/theme-seti/icons/seti.woff.extensionResource.js +2 -0
  459. package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.extensionResource.js +2 -0
  460. package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.extensionResource.js +2 -0
  461. package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.extensionResource.js +2 -0
  462. package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.extensionResource.js +2 -0
  463. package/dist/vscode-default-extensions/typescript-basics/language-configuration.json.extensionResource.js +2 -0
  464. package/dist/vscode-default-extensions/typescript-basics/snippets/typescript.code-snippets.extensionResource.js +2 -0
  465. package/dist/vscode-default-extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json.extensionResource.js +2 -0
  466. package/dist/vscode-default-extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json.extensionResource.js +2 -0
  467. package/dist/vscode-default-extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json.extensionResource.js +2 -0
  468. package/dist/vscode-default-extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json.extensionResource.js +2 -0
  469. package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +2 -0
  470. package/dist/vscode-default-extensions/vb/snippets/vb.code-snippets.extensionResource.js +2 -0
  471. package/dist/vscode-default-extensions/vb/syntaxes/asp-vb-net.tmlanguage.json.extensionResource.js +2 -0
  472. package/dist/vscode-default-extensions/xml/syntaxes/xml.tmLanguage.json.extensionResource.js +2 -0
  473. package/dist/vscode-default-extensions/xml/syntaxes/xsl.tmLanguage.json.extensionResource.js +2 -0
  474. package/dist/vscode-default-extensions/xml/xml.language-configuration.json.extensionResource.js +2 -0
  475. package/dist/vscode-default-extensions/xml/xsl.language-configuration.json.extensionResource.js +2 -0
  476. package/dist/vscode-default-extensions/yaml/language-configuration.json.extensionResource.js +2 -0
  477. package/dist/vscode-default-extensions/yaml/syntaxes/yaml.tmLanguage.json.extensionResource.js +2 -0
  478. package/dist/vscode-services/extHost.js +28 -5
  479. package/dist/vscode-services/l10n.js +26 -0
  480. package/dist/vscode-services/missing-services.js +64 -12
  481. package/dist/vscode-services/window.js +23 -5
  482. package/dist/workbenchThemeService.d.ts +20 -0
  483. package/dist/workspace.d.ts +141 -0
  484. package/monaco-editor-treemending.patch +1134 -1902
  485. package/package.json +28 -16
  486. package/dist/default-extensions/typescript-language-features.js +0 -6
  487. package/dist/extension-tools-b68a64de.js +0 -1024
  488. package/dist/vscode/vs/workbench/browser/parts/editor/editorPane.js +0 -242
  489. package/dist/vscode/vs/workbench/browser/parts/editor/editorWithViewState.js +0 -139
  490. package/dist/vscode/vs/workbench/browser/parts/editor/sideBySideEditor.js +0 -387
  491. package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +0 -289
  492. package/dist/vscode-default-extensions/bat/language-configuration.json.js +0 -2
  493. package/dist/vscode-default-extensions/bat/snippets/batchfile.code-snippets.js +0 -2
  494. package/dist/vscode-default-extensions/bat/syntaxes/batchfile.tmLanguage.json.js +0 -2
  495. package/dist/vscode-default-extensions/clojure/language-configuration.json.js +0 -2
  496. package/dist/vscode-default-extensions/clojure/syntaxes/clojure.tmLanguage.json.js +0 -2
  497. package/dist/vscode-default-extensions/coffeescript/language-configuration.json.js +0 -2
  498. package/dist/vscode-default-extensions/coffeescript/snippets/coffeescript.code-snippets.js +0 -2
  499. package/dist/vscode-default-extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json.js +0 -2
  500. package/dist/vscode-default-extensions/cpp/language-configuration.json.js +0 -2
  501. package/dist/vscode-default-extensions/cpp/snippets/c.code-snippets.js +0 -2
  502. package/dist/vscode-default-extensions/cpp/snippets/cpp.code-snippets.js +0 -2
  503. package/dist/vscode-default-extensions/cpp/syntaxes/c.tmLanguage.json.js +0 -2
  504. package/dist/vscode-default-extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json.js +0 -2
  505. package/dist/vscode-default-extensions/cpp/syntaxes/cpp.tmLanguage.json.js +0 -2
  506. package/dist/vscode-default-extensions/cpp/syntaxes/cuda-cpp.tmLanguage.json.js +0 -2
  507. package/dist/vscode-default-extensions/csharp/language-configuration.json.js +0 -2
  508. package/dist/vscode-default-extensions/csharp/snippets/csharp.code-snippets.js +0 -2
  509. package/dist/vscode-default-extensions/csharp/syntaxes/csharp.tmLanguage.json.js +0 -2
  510. package/dist/vscode-default-extensions/css/language-configuration.json.js +0 -2
  511. package/dist/vscode-default-extensions/css/syntaxes/css.tmLanguage.json.js +0 -2
  512. package/dist/vscode-default-extensions/dart/language-configuration.json.js +0 -2
  513. package/dist/vscode-default-extensions/dart/syntaxes/dart.tmLanguage.json.js +0 -2
  514. package/dist/vscode-default-extensions/diff/language-configuration.json.js +0 -2
  515. package/dist/vscode-default-extensions/diff/syntaxes/diff.tmLanguage.json.js +0 -2
  516. package/dist/vscode-default-extensions/docker/language-configuration.json.js +0 -2
  517. package/dist/vscode-default-extensions/docker/syntaxes/docker.tmLanguage.json.js +0 -2
  518. package/dist/vscode-default-extensions/fsharp/language-configuration.json.js +0 -2
  519. package/dist/vscode-default-extensions/fsharp/snippets/fsharp.code-snippets.js +0 -2
  520. package/dist/vscode-default-extensions/fsharp/syntaxes/fsharp.tmLanguage.json.js +0 -2
  521. package/dist/vscode-default-extensions/go/language-configuration.json.js +0 -2
  522. package/dist/vscode-default-extensions/go/syntaxes/go.tmLanguage.json.js +0 -2
  523. package/dist/vscode-default-extensions/groovy/language-configuration.json.js +0 -2
  524. package/dist/vscode-default-extensions/groovy/snippets/groovy.code-snippets.js +0 -2
  525. package/dist/vscode-default-extensions/groovy/syntaxes/groovy.tmLanguage.json.js +0 -2
  526. package/dist/vscode-default-extensions/handlebars/language-configuration.json.js +0 -2
  527. package/dist/vscode-default-extensions/handlebars/syntaxes/Handlebars.tmLanguage.json.js +0 -2
  528. package/dist/vscode-default-extensions/hlsl/language-configuration.json.js +0 -2
  529. package/dist/vscode-default-extensions/hlsl/syntaxes/hlsl.tmLanguage.json.js +0 -2
  530. package/dist/vscode-default-extensions/html/language-configuration.json.js +0 -2
  531. package/dist/vscode-default-extensions/html/snippets/html.code-snippets.js +0 -2
  532. package/dist/vscode-default-extensions/html/syntaxes/html-derivative.tmLanguage.json.js +0 -2
  533. package/dist/vscode-default-extensions/html/syntaxes/html.tmLanguage.json.js +0 -2
  534. package/dist/vscode-default-extensions/ini/ini.language-configuration.json.js +0 -2
  535. package/dist/vscode-default-extensions/ini/properties.language-configuration.json.js +0 -2
  536. package/dist/vscode-default-extensions/ini/syntaxes/ini.tmLanguage.json.js +0 -2
  537. package/dist/vscode-default-extensions/java/language-configuration.json.js +0 -2
  538. package/dist/vscode-default-extensions/java/snippets/java.code-snippets.js +0 -2
  539. package/dist/vscode-default-extensions/java/syntaxes/java.tmLanguage.json.js +0 -2
  540. package/dist/vscode-default-extensions/javascript/javascript-language-configuration.json.js +0 -2
  541. package/dist/vscode-default-extensions/javascript/snippets/javascript.code-snippets.js +0 -2
  542. package/dist/vscode-default-extensions/javascript/syntaxes/JavaScript.tmLanguage.json.js +0 -2
  543. package/dist/vscode-default-extensions/javascript/syntaxes/JavaScriptReact.tmLanguage.json.js +0 -2
  544. package/dist/vscode-default-extensions/javascript/syntaxes/Regular Expressions (JavaScript).tmLanguage.js +0 -2
  545. package/dist/vscode-default-extensions/javascript/tags-language-configuration.json.js +0 -2
  546. package/dist/vscode-default-extensions/json/language-configuration.json.js +0 -2
  547. package/dist/vscode-default-extensions/json/syntaxes/JSON.tmLanguage.json.js +0 -2
  548. package/dist/vscode-default-extensions/json/syntaxes/JSONC.tmLanguage.json.js +0 -2
  549. package/dist/vscode-default-extensions/julia/language-configuration.json.js +0 -2
  550. package/dist/vscode-default-extensions/julia/syntaxes/julia.tmLanguage.json.js +0 -2
  551. package/dist/vscode-default-extensions/latex/latex-cpp-embedded-language-configuration.json.js +0 -2
  552. package/dist/vscode-default-extensions/latex/latex-language-configuration.json.js +0 -2
  553. package/dist/vscode-default-extensions/latex/markdown-latex-combined-language-configuration.json.js +0 -2
  554. package/dist/vscode-default-extensions/latex/syntaxes/Bibtex.tmLanguage.json.js +0 -2
  555. package/dist/vscode-default-extensions/latex/syntaxes/LaTeX.tmLanguage.json.js +0 -2
  556. package/dist/vscode-default-extensions/latex/syntaxes/TeX.tmLanguage.json.js +0 -2
  557. package/dist/vscode-default-extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.js +0 -2
  558. package/dist/vscode-default-extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.js +0 -2
  559. package/dist/vscode-default-extensions/less/language-configuration.json.js +0 -2
  560. package/dist/vscode-default-extensions/less/syntaxes/less.tmLanguage.json.js +0 -2
  561. package/dist/vscode-default-extensions/log/syntaxes/log.tmLanguage.json.js +0 -2
  562. package/dist/vscode-default-extensions/lua/language-configuration.json.js +0 -2
  563. package/dist/vscode-default-extensions/lua/syntaxes/lua.tmLanguage.json.js +0 -2
  564. package/dist/vscode-default-extensions/make/language-configuration.json.js +0 -2
  565. package/dist/vscode-default-extensions/make/syntaxes/make.tmLanguage.json.js +0 -2
  566. package/dist/vscode-default-extensions/markdown-basics/language-configuration.json.js +0 -2
  567. package/dist/vscode-default-extensions/markdown-basics/snippets/markdown.code-snippets.js +0 -2
  568. package/dist/vscode-default-extensions/markdown-basics/syntaxes/markdown.tmLanguage.json.js +0 -2
  569. package/dist/vscode-default-extensions/objective-c/language-configuration.json.js +0 -2
  570. package/dist/vscode-default-extensions/objective-c/syntaxes/objective-c.tmLanguage.json.js +0 -2
  571. package/dist/vscode-default-extensions/objective-c/syntaxes/objective-c__.tmLanguage.json.js +0 -2
  572. package/dist/vscode-default-extensions/perl/perl.language-configuration.json.js +0 -2
  573. package/dist/vscode-default-extensions/perl/perl6.language-configuration.json.js +0 -2
  574. package/dist/vscode-default-extensions/perl/syntaxes/perl.tmLanguage.json.js +0 -2
  575. package/dist/vscode-default-extensions/perl/syntaxes/perl6.tmLanguage.json.js +0 -2
  576. package/dist/vscode-default-extensions/php/language-configuration.json.js +0 -2
  577. package/dist/vscode-default-extensions/php/snippets/php.code-snippets.js +0 -2
  578. package/dist/vscode-default-extensions/php/syntaxes/html.tmLanguage.json.js +0 -2
  579. package/dist/vscode-default-extensions/php/syntaxes/php.tmLanguage.json.js +0 -2
  580. package/dist/vscode-default-extensions/powershell/language-configuration.json.js +0 -2
  581. package/dist/vscode-default-extensions/powershell/syntaxes/powershell.tmLanguage.json.js +0 -2
  582. package/dist/vscode-default-extensions/pug/language-configuration.json.js +0 -2
  583. package/dist/vscode-default-extensions/pug/syntaxes/pug.tmLanguage.json.js +0 -2
  584. package/dist/vscode-default-extensions/python/language-configuration.json.js +0 -2
  585. package/dist/vscode-default-extensions/python/syntaxes/MagicPython.tmLanguage.json.js +0 -2
  586. package/dist/vscode-default-extensions/python/syntaxes/MagicRegExp.tmLanguage.json.js +0 -2
  587. package/dist/vscode-default-extensions/r/language-configuration.json.js +0 -2
  588. package/dist/vscode-default-extensions/r/syntaxes/r.tmLanguage.json.js +0 -2
  589. package/dist/vscode-default-extensions/razor/language-configuration.json.js +0 -2
  590. package/dist/vscode-default-extensions/razor/syntaxes/cshtml.tmLanguage.json.js +0 -2
  591. package/dist/vscode-default-extensions/ruby/language-configuration.json.js +0 -2
  592. package/dist/vscode-default-extensions/ruby/syntaxes/ruby.tmLanguage.json.js +0 -2
  593. package/dist/vscode-default-extensions/rust/language-configuration.json.js +0 -2
  594. package/dist/vscode-default-extensions/rust/syntaxes/rust.tmLanguage.json.js +0 -2
  595. package/dist/vscode-default-extensions/scss/language-configuration.json.js +0 -2
  596. package/dist/vscode-default-extensions/scss/syntaxes/sassdoc.tmLanguage.json.js +0 -2
  597. package/dist/vscode-default-extensions/scss/syntaxes/scss.tmLanguage.json.js +0 -2
  598. package/dist/vscode-default-extensions/shaderlab/language-configuration.json.js +0 -2
  599. package/dist/vscode-default-extensions/shaderlab/syntaxes/shaderlab.tmLanguage.json.js +0 -2
  600. package/dist/vscode-default-extensions/shellscript/language-configuration.json.js +0 -2
  601. package/dist/vscode-default-extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json.js +0 -2
  602. package/dist/vscode-default-extensions/sql/language-configuration.json.js +0 -2
  603. package/dist/vscode-default-extensions/sql/syntaxes/sql.tmLanguage.json.js +0 -2
  604. package/dist/vscode-default-extensions/swift/language-configuration.json.js +0 -2
  605. package/dist/vscode-default-extensions/swift/snippets/swift.code-snippets.js +0 -2
  606. package/dist/vscode-default-extensions/swift/syntaxes/swift.tmLanguage.json.js +0 -2
  607. package/dist/vscode-default-extensions/theme-abyss/themes/abyss-color-theme.json.js +0 -2
  608. package/dist/vscode-default-extensions/theme-defaults/fileicons/vs_minimal-icon-theme.json.js +0 -2
  609. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus.json.js +0 -2
  610. package/dist/vscode-default-extensions/theme-defaults/themes/dark_plus_experimental.json.js +0 -2
  611. package/dist/vscode-default-extensions/theme-defaults/themes/dark_vs.json.js +0 -2
  612. package/dist/vscode-default-extensions/theme-defaults/themes/hc_black.json.js +0 -2
  613. package/dist/vscode-default-extensions/theme-defaults/themes/hc_light.json.js +0 -2
  614. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus.json.js +0 -2
  615. package/dist/vscode-default-extensions/theme-defaults/themes/light_plus_experimental.json.js +0 -2
  616. package/dist/vscode-default-extensions/theme-defaults/themes/light_vs.json.js +0 -2
  617. package/dist/vscode-default-extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json.js +0 -2
  618. package/dist/vscode-default-extensions/theme-monokai/themes/monokai-color-theme.json.js +0 -2
  619. package/dist/vscode-default-extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json.js +0 -2
  620. package/dist/vscode-default-extensions/theme-quietlight/themes/quietlight-color-theme.json.js +0 -2
  621. package/dist/vscode-default-extensions/theme-red/themes/Red-color-theme.json.js +0 -2
  622. package/dist/vscode-default-extensions/theme-seti/icons/vs-seti-icon-theme.json.js +0 -2
  623. package/dist/vscode-default-extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json.js +0 -2
  624. package/dist/vscode-default-extensions/theme-solarized-light/themes/solarized-light-color-theme.json.js +0 -2
  625. package/dist/vscode-default-extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json.js +0 -2
  626. package/dist/vscode-default-extensions/typescript-basics/language-configuration.json.js +0 -2
  627. package/dist/vscode-default-extensions/typescript-basics/snippets/typescript.code-snippets.js +0 -2
  628. package/dist/vscode-default-extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json.js +0 -2
  629. package/dist/vscode-default-extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json.js +0 -2
  630. package/dist/vscode-default-extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json.js +0 -2
  631. package/dist/vscode-default-extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json.js +0 -2
  632. package/dist/vscode-default-extensions/typescript-language-features/package.json.js +0 -2
  633. package/dist/vscode-default-extensions/vb/language-configuration.json.js +0 -2
  634. package/dist/vscode-default-extensions/vb/snippets/vb.code-snippets.js +0 -2
  635. package/dist/vscode-default-extensions/vb/syntaxes/asp-vb-net.tmlanguage.json.js +0 -2
  636. package/dist/vscode-default-extensions/xml/syntaxes/xml.tmLanguage.json.js +0 -2
  637. package/dist/vscode-default-extensions/xml/syntaxes/xsl.tmLanguage.json.js +0 -2
  638. package/dist/vscode-default-extensions/xml/xml.language-configuration.json.js +0 -2
  639. package/dist/vscode-default-extensions/xml/xsl.language-configuration.json.js +0 -2
  640. package/dist/vscode-default-extensions/yaml/language-configuration.json.js +0 -2
  641. package/dist/vscode-default-extensions/yaml/syntaxes/yaml.tmLanguage.json.js +0 -2
@@ -0,0 +1,4762 @@
1
+ import { S as ServiceIdentifier, I as IInstantiationService } from './instantiation.js';
2
+ import { E as Event, C as CancellationToken, I as IDisposable, b as Emitter, d as IWaitUntil, D as Disposable } from './event.js';
3
+ import { a as ITextModel, P as Position, R as Range, S as Selection, e as IRange, E as EndOfLineSequence, f as IPosition, s as ISingleEditOperation, t as EditorAutoIndentStrategy, u as IDimension, v as ITextEditorModel, w as ITextSnapshot, I as ITextBufferFactory, d as IDiffEditor } from './editorBrowser.js';
4
+ import { U as URI } from './uri.js';
5
+ import { V as VSBuffer, n as VSBufferReadable, o as VSBufferReadableStream, p as IFileStatWithMetadata, q as FileOperation, r as ReadableStream, s as IReadFileStreamOptions, t as IWriteFileOptions, u as IBaseFileStatWithMetadata, v as IFileReadLimits, w as IRelativePattern } from './files.js';
6
+ import { I as IProgress, a as IProgressStep, w as IComposite, z as ICompositeControl } from './colorRegistry.js';
7
+ import { I as IMarkdownString, c as IEditorOptions, e as IEditorModel, f as IBaseTextResourceEditorInput, g as IBaseUntypedEditorInput, a as IResourceEditorInput, b as ITextResourceEditorInput } from './editor.js';
8
+ import { I as IContextKeyService } from './contextkey.js';
9
+ import { T as ThemeIcon } from './themables.js';
10
+ import { S as Severity, E as ExtensionIdentifier } from './extensions.d2.ts';
11
+
12
+ interface IDataTransferFile {
13
+ readonly name: string;
14
+ readonly uri?: URI;
15
+ data(): Promise<Uint8Array>;
16
+ }
17
+ interface IDataTransferItem {
18
+ readonly id: string;
19
+ asString(): Thenable<string>;
20
+ asFile(): IDataTransferFile | undefined;
21
+ value: any;
22
+ }
23
+ declare class VSDataTransfer {
24
+ private readonly _entries;
25
+ /**
26
+ * Get the total number of entries in this data transfer.
27
+ */
28
+ get size(): number;
29
+ /**
30
+ * Check if this data transfer contains data for `mimeType`.
31
+ *
32
+ * This uses exact matching and does not support wildcards.
33
+ */
34
+ has(mimeType: string): boolean;
35
+ /**
36
+ * Check if this data transfer contains data matching `mimeTypeGlob`.
37
+ *
38
+ * This allows matching for wildcards, such as `image/*`.
39
+ *
40
+ * Use the special `files` mime type to match any file in the data transfer.
41
+ */
42
+ matches(mimeTypeGlob: string): boolean;
43
+ /**
44
+ * Retrieve the first entry for `mimeType`.
45
+ *
46
+ * Note that if want to find all entries for a given mime type, use {@link VSDataTransfer.entries} instead.
47
+ */
48
+ get(mimeType: string): IDataTransferItem | undefined;
49
+ /**
50
+ * Add a new entry to this data transfer.
51
+ *
52
+ * This does not replace existing entries for `mimeType`.
53
+ */
54
+ append(mimeType: string, value: IDataTransferItem): void;
55
+ /**
56
+ * Set the entry for a given mime type.
57
+ *
58
+ * This replaces all existing entries for `mimeType`.
59
+ */
60
+ replace(mimeType: string, value: IDataTransferItem): void;
61
+ /**
62
+ * Remove all entries for `mimeType`.
63
+ */
64
+ delete(mimeType: string): void;
65
+ /**
66
+ * Iterate over all `[mime, item]` pairs in this data transfer.
67
+ *
68
+ * There may be multiple entries for each mime type.
69
+ */
70
+ entries(): Iterable<[string, IDataTransferItem]>;
71
+ /**
72
+ * Iterate over all items in this data transfer.
73
+ *
74
+ * There may be multiple entries for each mime type.
75
+ */
76
+ values(): Iterable<IDataTransferItem>;
77
+ /**
78
+ * Call `f` for each item and mime in the data transfer.
79
+ *
80
+ * There may be multiple entries for each mime type.
81
+ */
82
+ forEach(f: (value: IDataTransferItem, mime: string) => void): void;
83
+ private toKey;
84
+ }
85
+
86
+ /**
87
+ * Open ended enum at runtime
88
+ */
89
+ declare const enum LanguageId {
90
+ Null = 0,
91
+ PlainText = 1
92
+ }
93
+ /**
94
+ * Open ended enum at runtime
95
+ */
96
+ declare const enum ColorId {
97
+ None = 0,
98
+ DefaultForeground = 1,
99
+ DefaultBackground = 2
100
+ }
101
+ /**
102
+ * A standard token type.
103
+ */
104
+ declare const enum StandardTokenType {
105
+ Other = 0,
106
+ Comment = 1,
107
+ String = 2,
108
+ RegEx = 3
109
+ }
110
+ /**
111
+ */
112
+ interface ITokenPresentation {
113
+ foreground: ColorId;
114
+ italic: boolean;
115
+ bold: boolean;
116
+ underline: boolean;
117
+ strikethrough: boolean;
118
+ }
119
+
120
+ /**
121
+ *
122
+ */
123
+ interface IRelatedInformation {
124
+ resource: URI;
125
+ message: string;
126
+ startLineNumber: number;
127
+ startColumn: number;
128
+ endLineNumber: number;
129
+ endColumn: number;
130
+ }
131
+ declare const enum MarkerTag {
132
+ Unnecessary = 1,
133
+ Deprecated = 2
134
+ }
135
+ declare enum MarkerSeverity {
136
+ Hint = 1,
137
+ Info = 2,
138
+ Warning = 4,
139
+ Error = 8
140
+ }
141
+ declare namespace MarkerSeverity {
142
+ function compare(a: MarkerSeverity, b: MarkerSeverity): number;
143
+ function toString(a: MarkerSeverity): string;
144
+ function fromSeverity(severity: Severity): MarkerSeverity;
145
+ function toSeverity(severity: MarkerSeverity): Severity;
146
+ }
147
+ interface IResourceMarker {
148
+ resource: URI;
149
+ marker: IMarkerData;
150
+ }
151
+ interface IMarker {
152
+ owner: string;
153
+ resource: URI;
154
+ severity: MarkerSeverity;
155
+ code?: string | {
156
+ value: string;
157
+ target: URI;
158
+ };
159
+ message: string;
160
+ source?: string;
161
+ startLineNumber: number;
162
+ startColumn: number;
163
+ endLineNumber: number;
164
+ endColumn: number;
165
+ modelVersionId?: number;
166
+ relatedInformation?: IRelatedInformation[];
167
+ tags?: MarkerTag[];
168
+ }
169
+ interface MarkerStatistics {
170
+ errors: number;
171
+ warnings: number;
172
+ infos: number;
173
+ unknowns: number;
174
+ }
175
+ /**
176
+ * A structure defining a problem/warning/etc.
177
+ */
178
+ interface IMarkerData {
179
+ code?: string | {
180
+ value: string;
181
+ target: URI;
182
+ };
183
+ severity: MarkerSeverity;
184
+ message: string;
185
+ source?: string;
186
+ startLineNumber: number;
187
+ startColumn: number;
188
+ endLineNumber: number;
189
+ endColumn: number;
190
+ modelVersionId?: number;
191
+ relatedInformation?: IRelatedInformation[];
192
+ tags?: MarkerTag[];
193
+ }
194
+ declare namespace IMarkerData {
195
+ function makeKey(markerData: IMarkerData): string;
196
+ function makeKeyOptionalMessage(markerData: IMarkerData, useMessage: boolean): string;
197
+ }
198
+
199
+ interface IMarkerService {
200
+ readonly _serviceBrand: undefined;
201
+ getStatistics(): MarkerStatistics;
202
+ changeOne(owner: string, resource: URI, markers: IMarkerData[]): void;
203
+ changeAll(owner: string, data: IResourceMarker[]): void;
204
+ remove(owner: string, resources: URI[]): void;
205
+ read(filter?: {
206
+ owner?: string;
207
+ resource?: URI;
208
+ severities?: number;
209
+ take?: number;
210
+ }): IMarker[];
211
+ readonly onMarkerChanged: Event<readonly URI[]>;
212
+ }
213
+ declare const IMarkerService: ServiceIdentifier<IMarkerService>;
214
+
215
+ /**
216
+ * @internal
217
+ */
218
+ interface ILanguageIdCodec {
219
+ encodeLanguageId(languageId: string): LanguageId;
220
+ decodeLanguageId(languageId: LanguageId): string;
221
+ }
222
+ /**
223
+ * A provider result represents the values a provider, like the {@link HoverProvider},
224
+ * may return. For once this is the actual result type `T`, like `Hover`, or a thenable that resolves
225
+ * to that type `T`. In addition, `null` and `undefined` can be returned - either directly or from a
226
+ * thenable.
227
+ */
228
+ type ProviderResult<T> = T | undefined | null | Thenable<T | undefined | null>;
229
+ /**
230
+ * A hover represents additional information for a symbol or word. Hovers are
231
+ * rendered in a tooltip-like widget.
232
+ */
233
+ interface Hover {
234
+ /**
235
+ * The contents of this hover.
236
+ */
237
+ contents: IMarkdownString[];
238
+ /**
239
+ * The range to which this hover applies. When missing, the
240
+ * editor will use the range at the current position or the
241
+ * current position itself.
242
+ */
243
+ range?: IRange;
244
+ }
245
+ /**
246
+ * The hover provider interface defines the contract between extensions and
247
+ * the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
248
+ */
249
+ interface HoverProvider {
250
+ /**
251
+ * Provide a hover for the given position and document. Multiple hovers at the same
252
+ * position will be merged by the editor. A hover can have a range which defaults
253
+ * to the word range at the position when omitted.
254
+ */
255
+ provideHover(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Hover>;
256
+ }
257
+ /**
258
+ * An evaluatable expression represents additional information for an expression in a document. Evaluatable expressions are
259
+ * evaluated by a debugger or runtime and their result is rendered in a tooltip-like widget.
260
+ * @internal
261
+ */
262
+ interface EvaluatableExpression {
263
+ /**
264
+ * The range to which this expression applies.
265
+ */
266
+ range: IRange;
267
+ /**
268
+ * This expression overrides the expression extracted from the range.
269
+ */
270
+ expression?: string;
271
+ }
272
+ /**
273
+ * The evaluatable expression provider interface defines the contract between extensions and
274
+ * the debug hover.
275
+ * @internal
276
+ */
277
+ interface EvaluatableExpressionProvider {
278
+ /**
279
+ * Provide a hover for the given position and document. Multiple hovers at the same
280
+ * position will be merged by the editor. A hover can have a range which defaults
281
+ * to the word range at the position when omitted.
282
+ */
283
+ provideEvaluatableExpression(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<EvaluatableExpression>;
284
+ }
285
+ /**
286
+ * A value-object that contains contextual information when requesting inline values from a InlineValuesProvider.
287
+ * @internal
288
+ */
289
+ interface InlineValueContext {
290
+ frameId: number;
291
+ stoppedLocation: Range;
292
+ }
293
+ /**
294
+ * Provide inline value as text.
295
+ * @internal
296
+ */
297
+ interface InlineValueText {
298
+ type: 'text';
299
+ range: IRange;
300
+ text: string;
301
+ }
302
+ /**
303
+ * Provide inline value through a variable lookup.
304
+ * @internal
305
+ */
306
+ interface InlineValueVariableLookup {
307
+ type: 'variable';
308
+ range: IRange;
309
+ variableName?: string;
310
+ caseSensitiveLookup: boolean;
311
+ }
312
+ /**
313
+ * Provide inline value through an expression evaluation.
314
+ * @internal
315
+ */
316
+ interface InlineValueExpression {
317
+ type: 'expression';
318
+ range: IRange;
319
+ expression?: string;
320
+ }
321
+ /**
322
+ * Inline value information can be provided by different means:
323
+ * - directly as a text value (class InlineValueText).
324
+ * - as a name to use for a variable lookup (class InlineValueVariableLookup)
325
+ * - as an evaluatable expression (class InlineValueEvaluatableExpression)
326
+ * The InlineValue types combines all inline value types into one type.
327
+ * @internal
328
+ */
329
+ type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueExpression;
330
+ /**
331
+ * The inline values provider interface defines the contract between extensions and
332
+ * the debugger's inline values feature.
333
+ * @internal
334
+ */
335
+ interface InlineValuesProvider {
336
+ /**
337
+ */
338
+ onDidChangeInlineValues?: Event<void> | undefined;
339
+ /**
340
+ * Provide the "inline values" for the given range and document. Multiple hovers at the same
341
+ * position will be merged by the editor. A hover can have a range which defaults
342
+ * to the word range at the position when omitted.
343
+ */
344
+ provideInlineValues(model: ITextModel, viewPort: Range, context: InlineValueContext, token: CancellationToken): ProviderResult<InlineValue[]>;
345
+ }
346
+ declare const enum CompletionItemKind {
347
+ Method = 0,
348
+ Function = 1,
349
+ Constructor = 2,
350
+ Field = 3,
351
+ Variable = 4,
352
+ Class = 5,
353
+ Struct = 6,
354
+ Interface = 7,
355
+ Module = 8,
356
+ Property = 9,
357
+ Event = 10,
358
+ Operator = 11,
359
+ Unit = 12,
360
+ Value = 13,
361
+ Constant = 14,
362
+ Enum = 15,
363
+ EnumMember = 16,
364
+ Keyword = 17,
365
+ Text = 18,
366
+ Color = 19,
367
+ File = 20,
368
+ Reference = 21,
369
+ Customcolor = 22,
370
+ Folder = 23,
371
+ TypeParameter = 24,
372
+ User = 25,
373
+ Issue = 26,
374
+ Snippet = 27
375
+ }
376
+ interface CompletionItemLabel {
377
+ label: string;
378
+ detail?: string;
379
+ description?: string;
380
+ }
381
+ declare const enum CompletionItemTag {
382
+ Deprecated = 1
383
+ }
384
+ declare const enum CompletionItemInsertTextRule {
385
+ None = 0,
386
+ /**
387
+ * Adjust whitespace/indentation of multiline insert texts to
388
+ * match the current line indentation.
389
+ */
390
+ KeepWhitespace = 1,
391
+ /**
392
+ * `insertText` is a snippet.
393
+ */
394
+ InsertAsSnippet = 4
395
+ }
396
+ interface CompletionItemRanges {
397
+ insert: IRange;
398
+ replace: IRange;
399
+ }
400
+ /**
401
+ * A completion item represents a text snippet that is
402
+ * proposed to complete text that is being typed.
403
+ */
404
+ interface CompletionItem {
405
+ /**
406
+ * The label of this completion item. By default
407
+ * this is also the text that is inserted when selecting
408
+ * this completion.
409
+ */
410
+ label: string | CompletionItemLabel;
411
+ /**
412
+ * The kind of this completion item. Based on the kind
413
+ * an icon is chosen by the editor.
414
+ */
415
+ kind: CompletionItemKind;
416
+ /**
417
+ * A modifier to the `kind` which affect how the item
418
+ * is rendered, e.g. Deprecated is rendered with a strikeout
419
+ */
420
+ tags?: ReadonlyArray<CompletionItemTag>;
421
+ /**
422
+ * A human-readable string with additional information
423
+ * about this item, like type or symbol information.
424
+ */
425
+ detail?: string;
426
+ /**
427
+ * A human-readable string that represents a doc-comment.
428
+ */
429
+ documentation?: string | IMarkdownString;
430
+ /**
431
+ * A string that should be used when comparing this item
432
+ * with other items. When `falsy` the {@link CompletionItem.label label}
433
+ * is used.
434
+ */
435
+ sortText?: string;
436
+ /**
437
+ * A string that should be used when filtering a set of
438
+ * completion items. When `falsy` the {@link CompletionItem.label label}
439
+ * is used.
440
+ */
441
+ filterText?: string;
442
+ /**
443
+ * Select this item when showing. *Note* that only one completion item can be selected and
444
+ * that the editor decides which item that is. The rule is that the *first* item of those
445
+ * that match best is selected.
446
+ */
447
+ preselect?: boolean;
448
+ /**
449
+ * A string or snippet that should be inserted in a document when selecting
450
+ * this completion.
451
+ */
452
+ insertText: string;
453
+ /**
454
+ * Additional rules (as bitmask) that should be applied when inserting
455
+ * this completion.
456
+ */
457
+ insertTextRules?: CompletionItemInsertTextRule;
458
+ /**
459
+ * A range of text that should be replaced by this completion item.
460
+ *
461
+ * Defaults to a range from the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
462
+ * current position.
463
+ *
464
+ * *Note:* The range must be a {@link Range.isSingleLine single line} and it must
465
+ * {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
466
+ */
467
+ range: IRange | CompletionItemRanges;
468
+ /**
469
+ * An optional set of characters that when pressed while this completion is active will accept it first and
470
+ * then type that character. *Note* that all commit characters should have `length=1` and that superfluous
471
+ * characters will be ignored.
472
+ */
473
+ commitCharacters?: string[];
474
+ /**
475
+ * An optional array of additional text edits that are applied when
476
+ * selecting this completion. Edits must not overlap with the main edit
477
+ * nor with themselves.
478
+ */
479
+ additionalTextEdits?: ISingleEditOperation[];
480
+ /**
481
+ * A command that should be run upon acceptance of this item.
482
+ */
483
+ command?: Command;
484
+ /**
485
+ * @internal
486
+ */
487
+ extensionId?: ExtensionIdentifier;
488
+ /**
489
+ * @internal
490
+ */
491
+ _id?: [number, number];
492
+ }
493
+ interface CompletionList {
494
+ suggestions: CompletionItem[];
495
+ incomplete?: boolean;
496
+ dispose?(): void;
497
+ /**
498
+ * @internal
499
+ */
500
+ duration?: number;
501
+ }
502
+ /**
503
+ * How a suggest provider was triggered.
504
+ */
505
+ declare const enum CompletionTriggerKind {
506
+ Invoke = 0,
507
+ TriggerCharacter = 1,
508
+ TriggerForIncompleteCompletions = 2
509
+ }
510
+ /**
511
+ * Contains additional information about the context in which
512
+ * {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
513
+ */
514
+ interface CompletionContext {
515
+ /**
516
+ * How the completion was triggered.
517
+ */
518
+ triggerKind: CompletionTriggerKind;
519
+ /**
520
+ * Character that triggered the completion item provider.
521
+ *
522
+ * `undefined` if provider was not triggered by a character.
523
+ */
524
+ triggerCharacter?: string;
525
+ }
526
+ /**
527
+ * The completion item provider interface defines the contract between extensions and
528
+ * the [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).
529
+ *
530
+ * When computing *complete* completion items is expensive, providers can optionally implement
531
+ * the `resolveCompletionItem`-function. In that case it is enough to return completion
532
+ * items with a {@link CompletionItem.label label} from the
533
+ * {@link CompletionItemProvider.provideCompletionItems provideCompletionItems}-function. Subsequently,
534
+ * when a completion item is shown in the UI and gains focus this provider is asked to resolve
535
+ * the item, like adding {@link CompletionItem.documentation doc-comment} or {@link CompletionItem.detail details}.
536
+ */
537
+ interface CompletionItemProvider {
538
+ /**
539
+ * @internal
540
+ */
541
+ _debugDisplayName?: string;
542
+ triggerCharacters?: string[];
543
+ /**
544
+ * Provide completion items for the given position and document.
545
+ */
546
+ provideCompletionItems(model: ITextModel, position: Position, context: CompletionContext, token: CancellationToken): ProviderResult<CompletionList>;
547
+ /**
548
+ * Given a completion item fill in more data, like {@link CompletionItem.documentation doc-comment}
549
+ * or {@link CompletionItem.detail details}.
550
+ *
551
+ * The editor will only resolve a completion item once.
552
+ */
553
+ resolveCompletionItem?(item: CompletionItem, token: CancellationToken): ProviderResult<CompletionItem>;
554
+ }
555
+ /**
556
+ * How an {@link InlineCompletionsProvider inline completion provider} was triggered.
557
+ */
558
+ declare enum InlineCompletionTriggerKind {
559
+ /**
560
+ * Completion was triggered automatically while editing.
561
+ * It is sufficient to return a single completion item in this case.
562
+ */
563
+ Automatic = 0,
564
+ /**
565
+ * Completion was triggered explicitly by a user gesture.
566
+ * Return multiple completion items to enable cycling through them.
567
+ */
568
+ Explicit = 1
569
+ }
570
+ interface InlineCompletionContext {
571
+ /**
572
+ * How the completion was triggered.
573
+ */
574
+ readonly triggerKind: InlineCompletionTriggerKind;
575
+ readonly selectedSuggestionInfo: SelectedSuggestionInfo | undefined;
576
+ }
577
+ declare class SelectedSuggestionInfo {
578
+ readonly range: IRange;
579
+ readonly text: string;
580
+ readonly completionKind: CompletionItemKind;
581
+ readonly isSnippetText: boolean;
582
+ constructor(range: IRange, text: string, completionKind: CompletionItemKind, isSnippetText: boolean);
583
+ equals(other: SelectedSuggestionInfo): boolean;
584
+ }
585
+ interface InlineCompletion {
586
+ /**
587
+ * The text to insert.
588
+ * If the text contains a line break, the range must end at the end of a line.
589
+ * If existing text should be replaced, the existing text must be a prefix of the text to insert.
590
+ *
591
+ * The text can also be a snippet. In that case, a preview with default parameters is shown.
592
+ * When accepting the suggestion, the full snippet is inserted.
593
+ */
594
+ readonly insertText: string | {
595
+ snippet: string;
596
+ };
597
+ /**
598
+ * A text that is used to decide if this inline completion should be shown.
599
+ * An inline completion is shown if the text to replace is a subword of the filter text.
600
+ */
601
+ readonly filterText?: string;
602
+ /**
603
+ * An optional array of additional text edits that are applied when
604
+ * selecting this completion. Edits must not overlap with the main edit
605
+ * nor with themselves.
606
+ */
607
+ readonly additionalTextEdits?: ISingleEditOperation[];
608
+ /**
609
+ * The range to replace.
610
+ * Must begin and end on the same line.
611
+ */
612
+ readonly range?: IRange;
613
+ readonly command?: Command;
614
+ /**
615
+ * If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
616
+ * Defaults to `false`.
617
+ */
618
+ readonly completeBracketPairs?: boolean;
619
+ }
620
+ interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
621
+ readonly items: readonly TItem[];
622
+ /**
623
+ * A list of commands associated with the inline completions of this list.
624
+ */
625
+ readonly commands?: Command[];
626
+ readonly suppressSuggestions?: boolean | undefined;
627
+ /**
628
+ * When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
629
+ */
630
+ readonly enableForwardStability?: boolean | undefined;
631
+ }
632
+ interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
633
+ provideInlineCompletions(model: ITextModel, position: Position, context: InlineCompletionContext, token: CancellationToken): ProviderResult<T>;
634
+ /**
635
+ * Will be called when an item is shown.
636
+ * @param updatedInsertText Is useful to understand bracket completion.
637
+ */
638
+ handleItemDidShow?(completions: T, item: T['items'][number], updatedInsertText: string): void;
639
+ /**
640
+ * Will be called when an item is partially accepted.
641
+ */
642
+ handlePartialAccept?(completions: T, item: T['items'][number], acceptedCharacters: number): void;
643
+ /**
644
+ * Will be called when a completions list is no longer in use and can be garbage-collected.
645
+ */
646
+ freeInlineCompletions(completions: T): void;
647
+ }
648
+ interface CodeAction {
649
+ title: string;
650
+ command?: Command;
651
+ edit?: WorkspaceEdit;
652
+ diagnostics?: IMarkerData[];
653
+ kind?: string;
654
+ isPreferred?: boolean;
655
+ disabled?: string;
656
+ }
657
+ declare const enum CodeActionTriggerType {
658
+ Invoke = 1,
659
+ Auto = 2
660
+ }
661
+ /**
662
+ * @internal
663
+ */
664
+ interface CodeActionContext {
665
+ only?: string;
666
+ trigger: CodeActionTriggerType;
667
+ }
668
+ interface CodeActionList extends IDisposable {
669
+ readonly actions: ReadonlyArray<CodeAction>;
670
+ }
671
+ /**
672
+ * The code action interface defines the contract between extensions and
673
+ * the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.
674
+ * @internal
675
+ */
676
+ interface CodeActionProvider {
677
+ displayName?: string;
678
+ /**
679
+ * Provide commands for the given document and range.
680
+ */
681
+ provideCodeActions(model: ITextModel, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<CodeActionList>;
682
+ /**
683
+ * Given a code action fill in the edit. Will only invoked when missing.
684
+ */
685
+ resolveCodeAction?(codeAction: CodeAction, token: CancellationToken): ProviderResult<CodeAction>;
686
+ /**
687
+ * Optional list of CodeActionKinds that this provider returns.
688
+ */
689
+ readonly providedCodeActionKinds?: ReadonlyArray<string>;
690
+ readonly documentation?: ReadonlyArray<{
691
+ readonly kind: string;
692
+ readonly command: Command;
693
+ }>;
694
+ /**
695
+ * @internal
696
+ */
697
+ _getAdditionalMenuItems?(context: CodeActionContext, actions: readonly CodeAction[]): Command[];
698
+ }
699
+ /**
700
+ * @internal
701
+ */
702
+ interface DocumentPasteEdit {
703
+ insertText: string | {
704
+ snippet: string;
705
+ };
706
+ additionalEdit?: WorkspaceEdit;
707
+ }
708
+ /**
709
+ * @internal
710
+ */
711
+ interface DocumentPasteEditProvider {
712
+ readonly pasteMimeTypes: readonly string[];
713
+ prepareDocumentPaste?(model: ITextModel, ranges: readonly IRange[], dataTransfer: VSDataTransfer, token: CancellationToken): Promise<undefined | VSDataTransfer>;
714
+ provideDocumentPasteEdits(model: ITextModel, ranges: readonly IRange[], dataTransfer: VSDataTransfer, token: CancellationToken): Promise<DocumentPasteEdit | undefined>;
715
+ }
716
+ /**
717
+ * Represents a parameter of a callable-signature. A parameter can
718
+ * have a label and a doc-comment.
719
+ */
720
+ interface ParameterInformation {
721
+ /**
722
+ * The label of this signature. Will be shown in
723
+ * the UI.
724
+ */
725
+ label: string | [number, number];
726
+ /**
727
+ * The human-readable doc-comment of this signature. Will be shown
728
+ * in the UI but can be omitted.
729
+ */
730
+ documentation?: string | IMarkdownString;
731
+ }
732
+ /**
733
+ * Represents the signature of something callable. A signature
734
+ * can have a label, like a function-name, a doc-comment, and
735
+ * a set of parameters.
736
+ */
737
+ interface SignatureInformation {
738
+ /**
739
+ * The label of this signature. Will be shown in
740
+ * the UI.
741
+ */
742
+ label: string;
743
+ /**
744
+ * The human-readable doc-comment of this signature. Will be shown
745
+ * in the UI but can be omitted.
746
+ */
747
+ documentation?: string | IMarkdownString;
748
+ /**
749
+ * The parameters of this signature.
750
+ */
751
+ parameters: ParameterInformation[];
752
+ /**
753
+ * Index of the active parameter.
754
+ *
755
+ * If provided, this is used in place of `SignatureHelp.activeSignature`.
756
+ */
757
+ activeParameter?: number;
758
+ }
759
+ /**
760
+ * Signature help represents the signature of something
761
+ * callable. There can be multiple signatures but only one
762
+ * active and only one active parameter.
763
+ */
764
+ interface SignatureHelp {
765
+ /**
766
+ * One or more signatures.
767
+ */
768
+ signatures: SignatureInformation[];
769
+ /**
770
+ * The active signature.
771
+ */
772
+ activeSignature: number;
773
+ /**
774
+ * The active parameter of the active signature.
775
+ */
776
+ activeParameter: number;
777
+ }
778
+ interface SignatureHelpResult extends IDisposable {
779
+ value: SignatureHelp;
780
+ }
781
+ declare enum SignatureHelpTriggerKind {
782
+ Invoke = 1,
783
+ TriggerCharacter = 2,
784
+ ContentChange = 3
785
+ }
786
+ interface SignatureHelpContext {
787
+ readonly triggerKind: SignatureHelpTriggerKind;
788
+ readonly triggerCharacter?: string;
789
+ readonly isRetrigger: boolean;
790
+ readonly activeSignatureHelp?: SignatureHelp;
791
+ }
792
+ /**
793
+ * The signature help provider interface defines the contract between extensions and
794
+ * the [parameter hints](https://code.visualstudio.com/docs/editor/intellisense)-feature.
795
+ */
796
+ interface SignatureHelpProvider {
797
+ readonly signatureHelpTriggerCharacters?: ReadonlyArray<string>;
798
+ readonly signatureHelpRetriggerCharacters?: ReadonlyArray<string>;
799
+ /**
800
+ * Provide help for the signature at the given position and document.
801
+ */
802
+ provideSignatureHelp(model: ITextModel, position: Position, token: CancellationToken, context: SignatureHelpContext): ProviderResult<SignatureHelpResult>;
803
+ }
804
+ /**
805
+ * A document highlight kind.
806
+ */
807
+ declare enum DocumentHighlightKind {
808
+ /**
809
+ * A textual occurrence.
810
+ */
811
+ Text = 0,
812
+ /**
813
+ * Read-access of a symbol, like reading a variable.
814
+ */
815
+ Read = 1,
816
+ /**
817
+ * Write-access of a symbol, like writing to a variable.
818
+ */
819
+ Write = 2
820
+ }
821
+ /**
822
+ * A document highlight is a range inside a text document which deserves
823
+ * special attention. Usually a document highlight is visualized by changing
824
+ * the background color of its range.
825
+ */
826
+ interface DocumentHighlight {
827
+ /**
828
+ * The range this highlight applies to.
829
+ */
830
+ range: IRange;
831
+ /**
832
+ * The highlight kind, default is {@link DocumentHighlightKind.Text text}.
833
+ */
834
+ kind?: DocumentHighlightKind;
835
+ }
836
+ /**
837
+ * The document highlight provider interface defines the contract between extensions and
838
+ * the word-highlight-feature.
839
+ */
840
+ interface DocumentHighlightProvider {
841
+ /**
842
+ * Provide a set of document highlights, like all occurrences of a variable or
843
+ * all exit-points of a function.
844
+ */
845
+ provideDocumentHighlights(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<DocumentHighlight[]>;
846
+ }
847
+ /**
848
+ * The linked editing range provider interface defines the contract between extensions and
849
+ * the linked editing feature.
850
+ */
851
+ interface LinkedEditingRangeProvider {
852
+ /**
853
+ * Provide a list of ranges that can be edited together.
854
+ */
855
+ provideLinkedEditingRanges(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<LinkedEditingRanges>;
856
+ }
857
+ /**
858
+ * Represents a list of ranges that can be edited together along with a word pattern to describe valid contents.
859
+ */
860
+ interface LinkedEditingRanges {
861
+ /**
862
+ * A list of ranges that can be edited together. The ranges must have
863
+ * identical length and text content. The ranges cannot overlap
864
+ */
865
+ ranges: IRange[];
866
+ /**
867
+ * An optional word pattern that describes valid contents for the given ranges.
868
+ * If no pattern is provided, the language configuration's word pattern will be used.
869
+ */
870
+ wordPattern?: RegExp;
871
+ }
872
+ /**
873
+ * Value-object that contains additional information when
874
+ * requesting references.
875
+ */
876
+ interface ReferenceContext {
877
+ /**
878
+ * Include the declaration of the current symbol.
879
+ */
880
+ includeDeclaration: boolean;
881
+ }
882
+ /**
883
+ * The reference provider interface defines the contract between extensions and
884
+ * the [find references](https://code.visualstudio.com/docs/editor/editingevolved#_peek)-feature.
885
+ */
886
+ interface ReferenceProvider {
887
+ /**
888
+ * Provide a set of project-wide references for the given position and document.
889
+ */
890
+ provideReferences(model: ITextModel, position: Position, context: ReferenceContext, token: CancellationToken): ProviderResult<Location[]>;
891
+ }
892
+ /**
893
+ * Represents a location inside a resource, such as a line
894
+ * inside a text file.
895
+ */
896
+ interface Location {
897
+ /**
898
+ * The resource identifier of this location.
899
+ */
900
+ uri: URI;
901
+ /**
902
+ * The document range of this locations.
903
+ */
904
+ range: IRange;
905
+ }
906
+ interface LocationLink {
907
+ /**
908
+ * A range to select where this link originates from.
909
+ */
910
+ originSelectionRange?: IRange;
911
+ /**
912
+ * The target uri this link points to.
913
+ */
914
+ uri: URI;
915
+ /**
916
+ * The full range this link points to.
917
+ */
918
+ range: IRange;
919
+ /**
920
+ * A range to select this link points to. Must be contained
921
+ * in `LocationLink.range`.
922
+ */
923
+ targetSelectionRange?: IRange;
924
+ }
925
+ type Definition = Location | Location[] | LocationLink[];
926
+ /**
927
+ * The definition provider interface defines the contract between extensions and
928
+ * the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
929
+ * and peek definition features.
930
+ */
931
+ interface DefinitionProvider {
932
+ /**
933
+ * Provide the definition of the symbol at the given position and document.
934
+ */
935
+ provideDefinition(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
936
+ }
937
+ /**
938
+ * The definition provider interface defines the contract between extensions and
939
+ * the [go to definition](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition)
940
+ * and peek definition features.
941
+ */
942
+ interface DeclarationProvider {
943
+ /**
944
+ * Provide the declaration of the symbol at the given position and document.
945
+ */
946
+ provideDeclaration(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
947
+ }
948
+ /**
949
+ * The implementation provider interface defines the contract between extensions and
950
+ * the go to implementation feature.
951
+ */
952
+ interface ImplementationProvider {
953
+ /**
954
+ * Provide the implementation of the symbol at the given position and document.
955
+ */
956
+ provideImplementation(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
957
+ }
958
+ /**
959
+ * The type definition provider interface defines the contract between extensions and
960
+ * the go to type definition feature.
961
+ */
962
+ interface TypeDefinitionProvider {
963
+ /**
964
+ * Provide the type definition of the symbol at the given position and document.
965
+ */
966
+ provideTypeDefinition(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Definition | LocationLink[]>;
967
+ }
968
+ /**
969
+ * A symbol kind.
970
+ */
971
+ declare const enum SymbolKind {
972
+ File = 0,
973
+ Module = 1,
974
+ Namespace = 2,
975
+ Package = 3,
976
+ Class = 4,
977
+ Method = 5,
978
+ Property = 6,
979
+ Field = 7,
980
+ Constructor = 8,
981
+ Enum = 9,
982
+ Interface = 10,
983
+ Function = 11,
984
+ Variable = 12,
985
+ Constant = 13,
986
+ String = 14,
987
+ Number = 15,
988
+ Boolean = 16,
989
+ Array = 17,
990
+ Object = 18,
991
+ Key = 19,
992
+ Null = 20,
993
+ EnumMember = 21,
994
+ Struct = 22,
995
+ Event = 23,
996
+ Operator = 24,
997
+ TypeParameter = 25
998
+ }
999
+ declare const enum SymbolTag {
1000
+ Deprecated = 1
1001
+ }
1002
+ interface DocumentSymbol {
1003
+ name: string;
1004
+ detail: string;
1005
+ kind: SymbolKind;
1006
+ tags: ReadonlyArray<SymbolTag>;
1007
+ containerName?: string;
1008
+ range: IRange;
1009
+ selectionRange: IRange;
1010
+ children?: DocumentSymbol[];
1011
+ }
1012
+ /**
1013
+ * The document symbol provider interface defines the contract between extensions and
1014
+ * the [go to symbol](https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol)-feature.
1015
+ */
1016
+ interface DocumentSymbolProvider {
1017
+ displayName?: string;
1018
+ /**
1019
+ * Provide symbol information for the given document.
1020
+ */
1021
+ provideDocumentSymbols(model: ITextModel, token: CancellationToken): ProviderResult<DocumentSymbol[]>;
1022
+ }
1023
+ interface TextEdit {
1024
+ range: IRange;
1025
+ text: string;
1026
+ eol?: EndOfLineSequence;
1027
+ }
1028
+ /**
1029
+ * Interface used to format a model
1030
+ */
1031
+ interface FormattingOptions {
1032
+ /**
1033
+ * Size of a tab in spaces.
1034
+ */
1035
+ tabSize: number;
1036
+ /**
1037
+ * Prefer spaces over tabs.
1038
+ */
1039
+ insertSpaces: boolean;
1040
+ /**
1041
+ * The list of multiple ranges to format at once, if the provider supports it.
1042
+ */
1043
+ ranges?: Range[];
1044
+ }
1045
+ /**
1046
+ * The document formatting provider interface defines the contract between extensions and
1047
+ * the formatting-feature.
1048
+ */
1049
+ interface DocumentFormattingEditProvider {
1050
+ /**
1051
+ * @internal
1052
+ */
1053
+ readonly extensionId?: ExtensionIdentifier;
1054
+ readonly displayName?: string;
1055
+ /**
1056
+ * Provide formatting edits for a whole document.
1057
+ */
1058
+ provideDocumentFormattingEdits(model: ITextModel, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1059
+ }
1060
+ /**
1061
+ * The document formatting provider interface defines the contract between extensions and
1062
+ * the formatting-feature.
1063
+ */
1064
+ interface DocumentRangeFormattingEditProvider {
1065
+ /**
1066
+ * @internal
1067
+ */
1068
+ readonly extensionId?: ExtensionIdentifier;
1069
+ readonly displayName?: string;
1070
+ /**
1071
+ * Provide formatting edits for a range in a document.
1072
+ *
1073
+ * The given range is a hint and providers can decide to format a smaller
1074
+ * or larger range. Often this is done by adjusting the start and end
1075
+ * of the range to full syntax nodes.
1076
+ */
1077
+ provideDocumentRangeFormattingEdits(model: ITextModel, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1078
+ provideDocumentRangesFormattingEdits?(model: ITextModel, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1079
+ }
1080
+ /**
1081
+ * The document formatting provider interface defines the contract between extensions and
1082
+ * the formatting-feature.
1083
+ */
1084
+ interface OnTypeFormattingEditProvider {
1085
+ /**
1086
+ * @internal
1087
+ */
1088
+ readonly extensionId?: ExtensionIdentifier;
1089
+ autoFormatTriggerCharacters: string[];
1090
+ /**
1091
+ * Provide formatting edits after a character has been typed.
1092
+ *
1093
+ * The given position and character should hint to the provider
1094
+ * what range the position to expand to, like find the matching `{`
1095
+ * when `}` has been entered.
1096
+ */
1097
+ provideOnTypeFormattingEdits(model: ITextModel, position: Position, ch: string, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
1098
+ }
1099
+ /**
1100
+ * @internal
1101
+ */
1102
+ interface IInplaceReplaceSupportResult {
1103
+ value: string;
1104
+ range: IRange;
1105
+ }
1106
+ /**
1107
+ * A link inside the editor.
1108
+ */
1109
+ interface ILink {
1110
+ range: IRange;
1111
+ url?: URI | string;
1112
+ tooltip?: string;
1113
+ }
1114
+ interface ILinksList {
1115
+ links: ILink[];
1116
+ dispose?(): void;
1117
+ }
1118
+ /**
1119
+ * A provider of links.
1120
+ */
1121
+ interface LinkProvider {
1122
+ provideLinks(model: ITextModel, token: CancellationToken): ProviderResult<ILinksList>;
1123
+ resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;
1124
+ }
1125
+ /**
1126
+ * A color in RGBA format.
1127
+ */
1128
+ interface IColor {
1129
+ /**
1130
+ * The red component in the range [0-1].
1131
+ */
1132
+ readonly red: number;
1133
+ /**
1134
+ * The green component in the range [0-1].
1135
+ */
1136
+ readonly green: number;
1137
+ /**
1138
+ * The blue component in the range [0-1].
1139
+ */
1140
+ readonly blue: number;
1141
+ /**
1142
+ * The alpha component in the range [0-1].
1143
+ */
1144
+ readonly alpha: number;
1145
+ }
1146
+ /**
1147
+ * String representations for a color
1148
+ */
1149
+ interface IColorPresentation {
1150
+ /**
1151
+ * The label of this color presentation. It will be shown on the color
1152
+ * picker header. By default this is also the text that is inserted when selecting
1153
+ * this color presentation.
1154
+ */
1155
+ label: string;
1156
+ /**
1157
+ * An {@link TextEdit edit} which is applied to a document when selecting
1158
+ * this presentation for the color.
1159
+ */
1160
+ textEdit?: TextEdit;
1161
+ /**
1162
+ * An optional array of additional {@link TextEdit text edits} that are applied when
1163
+ * selecting this color presentation.
1164
+ */
1165
+ additionalTextEdits?: TextEdit[];
1166
+ }
1167
+ /**
1168
+ * A color range is a range in a text model which represents a color.
1169
+ */
1170
+ interface IColorInformation {
1171
+ /**
1172
+ * The range within the model.
1173
+ */
1174
+ range: IRange;
1175
+ /**
1176
+ * The color represented in this range.
1177
+ */
1178
+ color: IColor;
1179
+ }
1180
+ /**
1181
+ * A provider of colors for editor models.
1182
+ */
1183
+ interface DocumentColorProvider {
1184
+ /**
1185
+ * Provides the color ranges for a specific model.
1186
+ */
1187
+ provideDocumentColors(model: ITextModel, token: CancellationToken): ProviderResult<IColorInformation[]>;
1188
+ /**
1189
+ * Provide the string representations for a color.
1190
+ */
1191
+ provideColorPresentations(model: ITextModel, colorInfo: IColorInformation, token: CancellationToken): ProviderResult<IColorPresentation[]>;
1192
+ }
1193
+ interface SelectionRange {
1194
+ range: IRange;
1195
+ }
1196
+ interface SelectionRangeProvider {
1197
+ /**
1198
+ * Provide ranges that should be selected from the given position.
1199
+ */
1200
+ provideSelectionRanges(model: ITextModel, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[][]>;
1201
+ }
1202
+ interface FoldingContext {
1203
+ }
1204
+ /**
1205
+ * A provider of folding ranges for editor models.
1206
+ */
1207
+ interface FoldingRangeProvider {
1208
+ /**
1209
+ * @internal
1210
+ */
1211
+ readonly id?: string;
1212
+ /**
1213
+ * An optional event to signal that the folding ranges from this provider have changed.
1214
+ */
1215
+ onDidChange?: Event<this>;
1216
+ /**
1217
+ * Provides the folding ranges for a specific model.
1218
+ */
1219
+ provideFoldingRanges(model: ITextModel, context: FoldingContext, token: CancellationToken): ProviderResult<FoldingRange[]>;
1220
+ }
1221
+ interface FoldingRange {
1222
+ /**
1223
+ * The one-based start line of the range to fold. The folded area starts after the line's last character.
1224
+ */
1225
+ start: number;
1226
+ /**
1227
+ * The one-based end line of the range to fold. The folded area ends with the line's last character.
1228
+ */
1229
+ end: number;
1230
+ /**
1231
+ * Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
1232
+ * {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
1233
+ * like 'Fold all comments'. See
1234
+ * {@link FoldingRangeKind} for an enumeration of standardized kinds.
1235
+ */
1236
+ kind?: FoldingRangeKind;
1237
+ }
1238
+ declare class FoldingRangeKind {
1239
+ value: string;
1240
+ /**
1241
+ * Kind for folding range representing a comment. The value of the kind is 'comment'.
1242
+ */
1243
+ static readonly Comment: FoldingRangeKind;
1244
+ /**
1245
+ * Kind for folding range representing a import. The value of the kind is 'imports'.
1246
+ */
1247
+ static readonly Imports: FoldingRangeKind;
1248
+ /**
1249
+ * Kind for folding range representing regions (for example marked by `#region`, `#endregion`).
1250
+ * The value of the kind is 'region'.
1251
+ */
1252
+ static readonly Region: FoldingRangeKind;
1253
+ /**
1254
+ * Returns a {@link FoldingRangeKind} for the given value.
1255
+ *
1256
+ * @param value of the kind.
1257
+ */
1258
+ static fromValue(value: string): FoldingRangeKind;
1259
+ /**
1260
+ * Creates a new {@link FoldingRangeKind}.
1261
+ *
1262
+ * @param value of the kind.
1263
+ */
1264
+ constructor(value: string);
1265
+ }
1266
+ interface WorkspaceEditMetadata {
1267
+ needsConfirmation: boolean;
1268
+ label: string;
1269
+ description?: string;
1270
+ /**
1271
+ * @internal
1272
+ */
1273
+ iconPath?: ThemeIcon | URI | {
1274
+ light: URI;
1275
+ dark: URI;
1276
+ };
1277
+ }
1278
+ interface WorkspaceFileEditOptions {
1279
+ overwrite?: boolean;
1280
+ ignoreIfNotExists?: boolean;
1281
+ ignoreIfExists?: boolean;
1282
+ recursive?: boolean;
1283
+ copy?: boolean;
1284
+ folder?: boolean;
1285
+ skipTrashBin?: boolean;
1286
+ maxSize?: number;
1287
+ /**
1288
+ * @internal
1289
+ */
1290
+ contents?: Promise<VSBuffer>;
1291
+ }
1292
+ interface IWorkspaceFileEdit {
1293
+ oldResource?: URI;
1294
+ newResource?: URI;
1295
+ options?: WorkspaceFileEditOptions;
1296
+ metadata?: WorkspaceEditMetadata;
1297
+ }
1298
+ interface IWorkspaceTextEdit {
1299
+ resource: URI;
1300
+ textEdit: TextEdit & {
1301
+ insertAsSnippet?: boolean;
1302
+ };
1303
+ versionId: number | undefined;
1304
+ metadata?: WorkspaceEditMetadata;
1305
+ }
1306
+ interface WorkspaceEdit {
1307
+ edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
1308
+ }
1309
+ interface Rejection {
1310
+ rejectReason?: string;
1311
+ }
1312
+ interface RenameLocation {
1313
+ range: IRange;
1314
+ text: string;
1315
+ }
1316
+ interface RenameProvider {
1317
+ provideRenameEdits(model: ITextModel, position: Position, newName: string, token: CancellationToken): ProviderResult<WorkspaceEdit & Rejection>;
1318
+ resolveRenameLocation?(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<RenameLocation & Rejection>;
1319
+ }
1320
+ interface Command {
1321
+ id: string;
1322
+ title: string;
1323
+ tooltip?: string;
1324
+ arguments?: any[];
1325
+ }
1326
+ /**
1327
+ * @internal
1328
+ */
1329
+ declare namespace Command {
1330
+ /**
1331
+ * @internal
1332
+ */
1333
+ function is(obj: any): obj is Command;
1334
+ }
1335
+ interface CodeLens {
1336
+ range: IRange;
1337
+ id?: string;
1338
+ command?: Command;
1339
+ }
1340
+ interface CodeLensList {
1341
+ lenses: CodeLens[];
1342
+ dispose(): void;
1343
+ }
1344
+ interface CodeLensProvider {
1345
+ onDidChange?: Event<this>;
1346
+ provideCodeLenses(model: ITextModel, token: CancellationToken): ProviderResult<CodeLensList>;
1347
+ resolveCodeLens?(model: ITextModel, codeLens: CodeLens, token: CancellationToken): ProviderResult<CodeLens>;
1348
+ }
1349
+ declare enum InlayHintKind {
1350
+ Type = 1,
1351
+ Parameter = 2
1352
+ }
1353
+ interface InlayHintLabelPart {
1354
+ label: string;
1355
+ tooltip?: string | IMarkdownString;
1356
+ command?: Command;
1357
+ location?: Location;
1358
+ }
1359
+ interface InlayHint {
1360
+ label: string | InlayHintLabelPart[];
1361
+ tooltip?: string | IMarkdownString;
1362
+ textEdits?: TextEdit[];
1363
+ position: IPosition;
1364
+ kind?: InlayHintKind;
1365
+ paddingLeft?: boolean;
1366
+ paddingRight?: boolean;
1367
+ }
1368
+ interface InlayHintList {
1369
+ hints: InlayHint[];
1370
+ dispose(): void;
1371
+ }
1372
+ interface InlayHintsProvider {
1373
+ displayName?: string;
1374
+ onDidChangeInlayHints?: Event<void>;
1375
+ provideInlayHints(model: ITextModel, range: Range, token: CancellationToken): ProviderResult<InlayHintList>;
1376
+ resolveInlayHint?(hint: InlayHint, token: CancellationToken): ProviderResult<InlayHint>;
1377
+ }
1378
+ interface SemanticTokensLegend {
1379
+ readonly tokenTypes: string[];
1380
+ readonly tokenModifiers: string[];
1381
+ }
1382
+ interface SemanticTokens {
1383
+ readonly resultId?: string;
1384
+ readonly data: Uint32Array;
1385
+ }
1386
+ interface SemanticTokensEdit {
1387
+ readonly start: number;
1388
+ readonly deleteCount: number;
1389
+ readonly data?: Uint32Array;
1390
+ }
1391
+ interface SemanticTokensEdits {
1392
+ readonly resultId?: string;
1393
+ readonly edits: SemanticTokensEdit[];
1394
+ }
1395
+ interface DocumentSemanticTokensProvider {
1396
+ onDidChange?: Event<void>;
1397
+ getLegend(): SemanticTokensLegend;
1398
+ provideDocumentSemanticTokens(model: ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
1399
+ releaseDocumentSemanticTokens(resultId: string | undefined): void;
1400
+ }
1401
+ interface DocumentRangeSemanticTokensProvider {
1402
+ getLegend(): SemanticTokensLegend;
1403
+ provideDocumentRangeSemanticTokens(model: ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
1404
+ }
1405
+ /**
1406
+ * @internal
1407
+ */
1408
+ interface DocumentOnDropEdit {
1409
+ readonly label: string;
1410
+ insertText: string | {
1411
+ snippet: string;
1412
+ };
1413
+ additionalEdit?: WorkspaceEdit;
1414
+ }
1415
+ /**
1416
+ * @internal
1417
+ */
1418
+ interface DocumentOnDropEditProvider {
1419
+ readonly id: string;
1420
+ readonly dropMimeTypes?: readonly string[];
1421
+ provideDocumentOnDropEdits(model: ITextModel, position: IPosition, dataTransfer: VSDataTransfer, token: CancellationToken): ProviderResult<DocumentOnDropEdit>;
1422
+ }
1423
+
1424
+ interface IViewLineTokens {
1425
+ equals(other: IViewLineTokens): boolean;
1426
+ getCount(): number;
1427
+ getForeground(tokenIndex: number): ColorId;
1428
+ getEndOffset(tokenIndex: number): number;
1429
+ getClassName(tokenIndex: number): string;
1430
+ getInlineStyle(tokenIndex: number, colorMap: string[]): string;
1431
+ getPresentation(tokenIndex: number): ITokenPresentation;
1432
+ findTokenIndexAtOffset(offset: number): number;
1433
+ getLineContent(): string;
1434
+ getMetadata(tokenIndex: number): number;
1435
+ getLanguageId(tokenIndex: number): string;
1436
+ }
1437
+ declare class LineTokens implements IViewLineTokens {
1438
+ _lineTokensBrand: void;
1439
+ private readonly _tokens;
1440
+ private readonly _tokensCount;
1441
+ private readonly _text;
1442
+ private readonly _languageIdCodec;
1443
+ static defaultTokenMetadata: number;
1444
+ static createEmpty(lineContent: string, decoder: ILanguageIdCodec): LineTokens;
1445
+ constructor(tokens: Uint32Array, text: string, decoder: ILanguageIdCodec);
1446
+ equals(other: IViewLineTokens): boolean;
1447
+ slicedEquals(other: LineTokens, sliceFromTokenIndex: number, sliceTokenCount: number): boolean;
1448
+ getLineContent(): string;
1449
+ getCount(): number;
1450
+ getStartOffset(tokenIndex: number): number;
1451
+ getMetadata(tokenIndex: number): number;
1452
+ getLanguageId(tokenIndex: number): string;
1453
+ getStandardTokenType(tokenIndex: number): StandardTokenType;
1454
+ getForeground(tokenIndex: number): ColorId;
1455
+ getClassName(tokenIndex: number): string;
1456
+ getInlineStyle(tokenIndex: number, colorMap: string[]): string;
1457
+ getPresentation(tokenIndex: number): ITokenPresentation;
1458
+ getEndOffset(tokenIndex: number): number;
1459
+ /**
1460
+ * Find the token containing offset `offset`.
1461
+ * @param offset The search offset
1462
+ * @return The index of the token containing the offset.
1463
+ */
1464
+ findTokenIndexAtOffset(offset: number): number;
1465
+ inflate(): IViewLineTokens;
1466
+ sliceAndInflate(startOffset: number, endOffset: number, deltaOffset: number): IViewLineTokens;
1467
+ static convertToEndOffset(tokens: Uint32Array, lineTextLength: number): void;
1468
+ static findIndexInTokensArray(tokens: Uint32Array, desiredIndex: number): number;
1469
+ /**
1470
+ * @pure
1471
+ * @param insertTokens Must be sorted by offset.
1472
+ */
1473
+ withInserted(insertTokens: {
1474
+ offset: number;
1475
+ text: string;
1476
+ tokenMetadata: number;
1477
+ }[]): LineTokens;
1478
+ }
1479
+
1480
+ declare class ScopedLineTokens {
1481
+ _scopedLineTokensBrand: void;
1482
+ readonly languageId: string;
1483
+ private readonly _actual;
1484
+ private readonly _firstTokenIndex;
1485
+ private readonly _lastTokenIndex;
1486
+ readonly firstCharOffset: number;
1487
+ private readonly _lastCharOffset;
1488
+ constructor(actual: LineTokens, languageId: string, firstTokenIndex: number, lastTokenIndex: number, firstCharOffset: number, lastCharOffset: number);
1489
+ getLineContent(): string;
1490
+ getActualLineContentBefore(offset: number): string;
1491
+ getTokenCount(): number;
1492
+ findTokenIndexAtOffset(offset: number): number;
1493
+ getStandardTokenType(tokenIndex: number): StandardTokenType;
1494
+ }
1495
+
1496
+ /**
1497
+ * Describes how comments for a language work.
1498
+ */
1499
+ interface CommentRule {
1500
+ /**
1501
+ * The line comment token, like `// this is a comment`
1502
+ */
1503
+ lineComment?: string | null;
1504
+ /**
1505
+ * The block comment character pair, like `/* block comment *&#47;`
1506
+ */
1507
+ blockComment?: CharacterPair | null;
1508
+ }
1509
+ /**
1510
+ * The language configuration interface defines the contract between extensions and
1511
+ * various editor features, like automatic bracket insertion, automatic indentation etc.
1512
+ */
1513
+ interface LanguageConfiguration {
1514
+ /**
1515
+ * The language's comment settings.
1516
+ */
1517
+ comments?: CommentRule;
1518
+ /**
1519
+ * The language's brackets.
1520
+ * This configuration implicitly affects pressing Enter around these brackets.
1521
+ */
1522
+ brackets?: CharacterPair[];
1523
+ /**
1524
+ * The language's word definition.
1525
+ * If the language supports Unicode identifiers (e.g. JavaScript), it is preferable
1526
+ * to provide a word definition that uses exclusion of known separators.
1527
+ * e.g.: A regex that matches anything except known separators (and dot is allowed to occur in a floating point number):
1528
+ * /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g
1529
+ */
1530
+ wordPattern?: RegExp;
1531
+ /**
1532
+ * The language's indentation settings.
1533
+ */
1534
+ indentationRules?: IndentationRule;
1535
+ /**
1536
+ * The language's rules to be evaluated when pressing Enter.
1537
+ */
1538
+ onEnterRules?: OnEnterRule[];
1539
+ /**
1540
+ * The language's auto closing pairs. The 'close' character is automatically inserted with the
1541
+ * 'open' character is typed. If not set, the configured brackets will be used.
1542
+ */
1543
+ autoClosingPairs?: IAutoClosingPairConditional[];
1544
+ /**
1545
+ * The language's surrounding pairs. When the 'open' character is typed on a selection, the
1546
+ * selected string is surrounded by the open and close characters. If not set, the autoclosing pairs
1547
+ * settings will be used.
1548
+ */
1549
+ surroundingPairs?: IAutoClosingPair[];
1550
+ /**
1551
+ * Defines a list of bracket pairs that are colorized depending on their nesting level.
1552
+ * If not set, the configured brackets will be used.
1553
+ */
1554
+ colorizedBracketPairs?: CharacterPair[];
1555
+ /**
1556
+ * Defines what characters must be after the cursor for bracket or quote autoclosing to occur when using the \'languageDefined\' autoclosing setting.
1557
+ *
1558
+ * This is typically the set of characters which can not start an expression, such as whitespace, closing brackets, non-unary operators, etc.
1559
+ */
1560
+ autoCloseBefore?: string;
1561
+ /**
1562
+ * The language's folding rules.
1563
+ */
1564
+ folding?: FoldingRules;
1565
+ /**
1566
+ * **Deprecated** Do not use.
1567
+ *
1568
+ * @deprecated Will be replaced by a better API soon.
1569
+ */
1570
+ __electricCharacterSupport?: {
1571
+ docComment?: IDocComment;
1572
+ };
1573
+ }
1574
+ /**
1575
+ * Describes indentation rules for a language.
1576
+ */
1577
+ interface IndentationRule {
1578
+ /**
1579
+ * If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches).
1580
+ */
1581
+ decreaseIndentPattern: RegExp;
1582
+ /**
1583
+ * If a line matches this pattern, then all the lines after it should be indented once (until another rule matches).
1584
+ */
1585
+ increaseIndentPattern: RegExp;
1586
+ /**
1587
+ * If a line matches this pattern, then **only the next line** after it should be indented once.
1588
+ */
1589
+ indentNextLinePattern?: RegExp | null;
1590
+ /**
1591
+ * If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules.
1592
+ */
1593
+ unIndentedLinePattern?: RegExp | null;
1594
+ }
1595
+ /**
1596
+ * Describes language specific folding markers such as '#region' and '#endregion'.
1597
+ * The start and end regexes will be tested against the contents of all lines and must be designed efficiently:
1598
+ * - the regex should start with '^'
1599
+ * - regexp flags (i, g) are ignored
1600
+ */
1601
+ interface FoldingMarkers {
1602
+ start: RegExp;
1603
+ end: RegExp;
1604
+ }
1605
+ /**
1606
+ * Describes folding rules for a language.
1607
+ */
1608
+ interface FoldingRules {
1609
+ /**
1610
+ * Used by the indentation based strategy to decide whether empty lines belong to the previous or the next block.
1611
+ * A language adheres to the off-side rule if blocks in that language are expressed by their indentation.
1612
+ * See [wikipedia](https://en.wikipedia.org/wiki/Off-side_rule) for more information.
1613
+ * If not set, `false` is used and empty lines belong to the previous block.
1614
+ */
1615
+ offSide?: boolean;
1616
+ /**
1617
+ * Region markers used by the language.
1618
+ */
1619
+ markers?: FoldingMarkers;
1620
+ }
1621
+ /**
1622
+ * Describes a rule to be evaluated when pressing Enter.
1623
+ */
1624
+ interface OnEnterRule {
1625
+ /**
1626
+ * This rule will only execute if the text before the cursor matches this regular expression.
1627
+ */
1628
+ beforeText: RegExp;
1629
+ /**
1630
+ * This rule will only execute if the text after the cursor matches this regular expression.
1631
+ */
1632
+ afterText?: RegExp;
1633
+ /**
1634
+ * This rule will only execute if the text above the this line matches this regular expression.
1635
+ */
1636
+ previousLineText?: RegExp;
1637
+ /**
1638
+ * The action to execute.
1639
+ */
1640
+ action: EnterAction;
1641
+ }
1642
+ /**
1643
+ * Definition of documentation comments (e.g. Javadoc/JSdoc)
1644
+ */
1645
+ interface IDocComment {
1646
+ /**
1647
+ * The string that starts a doc comment (e.g. '/**')
1648
+ */
1649
+ open: string;
1650
+ /**
1651
+ * The string that appears on the last line and closes the doc comment (e.g. ' * /').
1652
+ */
1653
+ close?: string;
1654
+ }
1655
+ /**
1656
+ * A tuple of two characters, like a pair of
1657
+ * opening and closing brackets.
1658
+ */
1659
+ type CharacterPair = [string, string];
1660
+ interface IAutoClosingPair {
1661
+ open: string;
1662
+ close: string;
1663
+ }
1664
+ interface IAutoClosingPairConditional extends IAutoClosingPair {
1665
+ notIn?: string[];
1666
+ }
1667
+ /**
1668
+ * Describes what to do with the indentation when pressing Enter.
1669
+ */
1670
+ declare enum IndentAction {
1671
+ /**
1672
+ * Insert new line and copy the previous line's indentation.
1673
+ */
1674
+ None = 0,
1675
+ /**
1676
+ * Insert new line and indent once (relative to the previous line's indentation).
1677
+ */
1678
+ Indent = 1,
1679
+ /**
1680
+ * Insert two new lines:
1681
+ * - the first one indented which will hold the cursor
1682
+ * - the second one at the same indentation level
1683
+ */
1684
+ IndentOutdent = 2,
1685
+ /**
1686
+ * Insert new line and outdent once (relative to the previous line's indentation).
1687
+ */
1688
+ Outdent = 3
1689
+ }
1690
+ /**
1691
+ * Describes what to do when pressing Enter.
1692
+ */
1693
+ interface EnterAction {
1694
+ /**
1695
+ * Describe what to do with the indentation.
1696
+ */
1697
+ indentAction: IndentAction;
1698
+ /**
1699
+ * Describes text to be appended after the new line and after the indentation.
1700
+ */
1701
+ appendText?: string;
1702
+ /**
1703
+ * Describes the number of characters to remove from the new line's indentation.
1704
+ */
1705
+ removeText?: number;
1706
+ }
1707
+ /**
1708
+ * @internal
1709
+ */
1710
+ declare class StandardAutoClosingPairConditional {
1711
+ readonly open: string;
1712
+ readonly close: string;
1713
+ private readonly _inString;
1714
+ private readonly _inComment;
1715
+ private readonly _inRegEx;
1716
+ private _neutralCharacter;
1717
+ private _neutralCharacterSearched;
1718
+ constructor(source: IAutoClosingPairConditional);
1719
+ isOK(standardToken: StandardTokenType): boolean;
1720
+ shouldAutoClose(context: ScopedLineTokens, column: number): boolean;
1721
+ private _findNeutralCharacterInRange;
1722
+ /**
1723
+ * Find a character in the range [0-9a-zA-Z] that does not appear in the open or close
1724
+ */
1725
+ findNeutralCharacter(): string | null;
1726
+ }
1727
+ /**
1728
+ * @internal
1729
+ */
1730
+ declare class AutoClosingPairs {
1731
+ /** Key is first character of open */
1732
+ readonly autoClosingPairsOpenByStart: Map<string, StandardAutoClosingPairConditional[]>;
1733
+ /** Key is last character of open */
1734
+ readonly autoClosingPairsOpenByEnd: Map<string, StandardAutoClosingPairConditional[]>;
1735
+ /** Key is first character of close */
1736
+ readonly autoClosingPairsCloseByStart: Map<string, StandardAutoClosingPairConditional[]>;
1737
+ /** Key is last character of close */
1738
+ readonly autoClosingPairsCloseByEnd: Map<string, StandardAutoClosingPairConditional[]>;
1739
+ /** Key is close. Only has pairs that are a single character */
1740
+ readonly autoClosingPairsCloseSingleChar: Map<string, StandardAutoClosingPairConditional[]>;
1741
+ constructor(autoClosingPairs: StandardAutoClosingPairConditional[]);
1742
+ }
1743
+
1744
+ /**
1745
+ * Captures all bracket related configurations for a single language.
1746
+ * Immutable.
1747
+ */
1748
+ declare class LanguageBracketsConfiguration {
1749
+ readonly languageId: string;
1750
+ private readonly _openingBrackets;
1751
+ private readonly _closingBrackets;
1752
+ constructor(languageId: string, config: LanguageConfiguration);
1753
+ /**
1754
+ * No two brackets have the same bracket text.
1755
+ */
1756
+ get openingBrackets(): readonly OpeningBracketKind[];
1757
+ /**
1758
+ * No two brackets have the same bracket text.
1759
+ */
1760
+ get closingBrackets(): readonly ClosingBracketKind[];
1761
+ getOpeningBracketInfo(bracketText: string): OpeningBracketKind | undefined;
1762
+ getClosingBracketInfo(bracketText: string): ClosingBracketKind | undefined;
1763
+ getBracketInfo(bracketText: string): BracketKind | undefined;
1764
+ }
1765
+ type BracketKind = OpeningBracketKind | ClosingBracketKind;
1766
+ declare class BracketKindBase {
1767
+ protected readonly config: LanguageBracketsConfiguration;
1768
+ readonly bracketText: string;
1769
+ constructor(config: LanguageBracketsConfiguration, bracketText: string);
1770
+ get languageId(): string;
1771
+ }
1772
+ declare class OpeningBracketKind extends BracketKindBase {
1773
+ readonly openedBrackets: ReadonlySet<ClosingBracketKind>;
1774
+ readonly isOpeningBracket = true;
1775
+ constructor(config: LanguageBracketsConfiguration, bracketText: string, openedBrackets: ReadonlySet<ClosingBracketKind>);
1776
+ }
1777
+ declare class ClosingBracketKind extends BracketKindBase {
1778
+ /**
1779
+ * Non empty array of all opening brackets this bracket closes.
1780
+ */
1781
+ readonly openingBrackets: ReadonlySet<OpeningBracketKind>;
1782
+ private readonly openingColorizedBrackets;
1783
+ readonly isOpeningBracket = false;
1784
+ constructor(config: LanguageBracketsConfiguration, bracketText: string,
1785
+ /**
1786
+ * Non empty array of all opening brackets this bracket closes.
1787
+ */
1788
+ openingBrackets: ReadonlySet<OpeningBracketKind>, openingColorizedBrackets: ReadonlySet<OpeningBracketKind>);
1789
+ /**
1790
+ * Checks if this bracket closes the given other bracket.
1791
+ * If the bracket infos come from different configurations, this method will return false.
1792
+ */
1793
+ closes(other: OpeningBracketKind): boolean;
1794
+ closesColorized(other: OpeningBracketKind): boolean;
1795
+ getOpeningBrackets(): readonly OpeningBracketKind[];
1796
+ }
1797
+
1798
+ declare class CharacterPairSupport {
1799
+ static readonly DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES = ";:.,=}])> \n\t";
1800
+ static readonly DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = "'\"`;:.,=}])> \n\t";
1801
+ static readonly DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE = " \n\t";
1802
+ private readonly _autoClosingPairs;
1803
+ private readonly _surroundingPairs;
1804
+ private readonly _autoCloseBeforeForQuotes;
1805
+ private readonly _autoCloseBeforeForBrackets;
1806
+ constructor(config: LanguageConfiguration);
1807
+ getAutoClosingPairs(): StandardAutoClosingPairConditional[];
1808
+ getAutoCloseBeforeSet(forQuotes: boolean): string;
1809
+ getSurroundingPairs(): IAutoClosingPair[];
1810
+ }
1811
+
1812
+ /**
1813
+ * Represents a grouping of colliding bracket pairs.
1814
+ *
1815
+ * Most of the times this contains a single bracket pair,
1816
+ * but sometimes this contains multiple bracket pairs in cases
1817
+ * where the same string appears as a closing bracket for multiple
1818
+ * bracket pairs, or the same string appears an opening bracket for
1819
+ * multiple bracket pairs.
1820
+ *
1821
+ * e.g. of a group containing a single pair:
1822
+ * open: ['{'], close: ['}']
1823
+ *
1824
+ * e.g. of a group containing multiple pairs:
1825
+ * open: ['if', 'for'], close: ['end', 'end']
1826
+ */
1827
+ declare class RichEditBracket {
1828
+ _richEditBracketBrand: void;
1829
+ readonly languageId: string;
1830
+ /**
1831
+ * A 0-based consecutive unique identifier for this bracket pair.
1832
+ * If a language has 5 bracket pairs, out of which 2 are grouped together,
1833
+ * it is expected that the `index` goes from 0 to 4.
1834
+ */
1835
+ readonly index: number;
1836
+ /**
1837
+ * The open sequence for each bracket pair contained in this group.
1838
+ *
1839
+ * The open sequence at a specific index corresponds to the
1840
+ * closing sequence at the same index.
1841
+ *
1842
+ * [ open[i], closed[i] ] represent a bracket pair.
1843
+ */
1844
+ readonly open: string[];
1845
+ /**
1846
+ * The close sequence for each bracket pair contained in this group.
1847
+ *
1848
+ * The close sequence at a specific index corresponds to the
1849
+ * opening sequence at the same index.
1850
+ *
1851
+ * [ open[i], closed[i] ] represent a bracket pair.
1852
+ */
1853
+ readonly close: string[];
1854
+ /**
1855
+ * A regular expression that is useful to search for this bracket pair group in a string.
1856
+ *
1857
+ * This regular expression is built in a way that it is aware of the other bracket
1858
+ * pairs defined for the language, so it might match brackets from other groups.
1859
+ *
1860
+ * See the fine details in `getRegexForBracketPair`.
1861
+ */
1862
+ readonly forwardRegex: RegExp;
1863
+ /**
1864
+ * A regular expression that is useful to search for this bracket pair group in a string backwards.
1865
+ *
1866
+ * This regular expression is built in a way that it is aware of the other bracket
1867
+ * pairs defined for the language, so it might match brackets from other groups.
1868
+ *
1869
+ * See the fine defails in `getReversedRegexForBracketPair`.
1870
+ */
1871
+ readonly reversedRegex: RegExp;
1872
+ private readonly _openSet;
1873
+ private readonly _closeSet;
1874
+ constructor(languageId: string, index: number, open: string[], close: string[], forwardRegex: RegExp, reversedRegex: RegExp);
1875
+ /**
1876
+ * Check if the provided `text` is an open bracket in this group.
1877
+ */
1878
+ isOpen(text: string): boolean;
1879
+ /**
1880
+ * Check if the provided `text` is a close bracket in this group.
1881
+ */
1882
+ isClose(text: string): boolean;
1883
+ private static _toSet;
1884
+ }
1885
+ declare class RichEditBrackets {
1886
+ _richEditBracketsBrand: void;
1887
+ /**
1888
+ * All groups of brackets defined for this language.
1889
+ */
1890
+ readonly brackets: RichEditBracket[];
1891
+ /**
1892
+ * A regular expression that is useful to search for all bracket pairs in a string.
1893
+ *
1894
+ * See the fine details in `getRegexForBrackets`.
1895
+ */
1896
+ readonly forwardRegex: RegExp;
1897
+ /**
1898
+ * A regular expression that is useful to search for all bracket pairs in a string backwards.
1899
+ *
1900
+ * See the fine details in `getReversedRegexForBrackets`.
1901
+ */
1902
+ readonly reversedRegex: RegExp;
1903
+ /**
1904
+ * The length (i.e. str.length) for the longest bracket pair.
1905
+ */
1906
+ readonly maxBracketLength: number;
1907
+ /**
1908
+ * A map useful for decoding a regex match and finding which bracket group was matched.
1909
+ */
1910
+ readonly textIsBracket: {
1911
+ [text: string]: RichEditBracket;
1912
+ };
1913
+ /**
1914
+ * A set useful for decoding if a regex match is the open bracket of a bracket pair.
1915
+ */
1916
+ readonly textIsOpenBracket: {
1917
+ [text: string]: boolean;
1918
+ };
1919
+ constructor(languageId: string, _brackets: readonly CharacterPair[]);
1920
+ }
1921
+
1922
+ /**
1923
+ * Interface used to support electric characters
1924
+ * @internal
1925
+ */
1926
+ interface IElectricAction {
1927
+ matchOpenBracket: string;
1928
+ }
1929
+ declare class BracketElectricCharacterSupport {
1930
+ private readonly _richEditBrackets;
1931
+ constructor(richEditBrackets: RichEditBrackets | null);
1932
+ getElectricCharacters(): string[];
1933
+ onElectricCharacter(character: string, context: ScopedLineTokens, column: number): IElectricAction | null;
1934
+ }
1935
+
1936
+ declare class IndentRulesSupport {
1937
+ private readonly _indentationRules;
1938
+ constructor(indentationRules: IndentationRule);
1939
+ shouldIncrease(text: string): boolean;
1940
+ shouldDecrease(text: string): boolean;
1941
+ shouldIndentNextLine(text: string): boolean;
1942
+ shouldIgnore(text: string): boolean;
1943
+ getIndentMetadata(text: string): number;
1944
+ }
1945
+
1946
+ /**
1947
+ * Interface used to support insertion of mode specific comments.
1948
+ */
1949
+ interface ICommentsConfiguration {
1950
+ lineCommentToken?: string;
1951
+ blockCommentStartToken?: string;
1952
+ blockCommentEndToken?: string;
1953
+ }
1954
+ declare class LanguageConfigurationServiceChangeEvent {
1955
+ readonly languageId: string | undefined;
1956
+ constructor(languageId: string | undefined);
1957
+ affects(languageId: string): boolean;
1958
+ }
1959
+ interface ILanguageConfigurationService {
1960
+ readonly _serviceBrand: undefined;
1961
+ onDidChange: Event<LanguageConfigurationServiceChangeEvent>;
1962
+ /**
1963
+ * @param priority Use a higher number for higher priority
1964
+ */
1965
+ register(languageId: string, configuration: LanguageConfiguration, priority?: number): IDisposable;
1966
+ getLanguageConfiguration(languageId: string): ResolvedLanguageConfiguration;
1967
+ }
1968
+ declare const ILanguageConfigurationService: ServiceIdentifier<ILanguageConfigurationService>;
1969
+ /**
1970
+ * Immutable.
1971
+ */
1972
+ declare class ResolvedLanguageConfiguration {
1973
+ readonly languageId: string;
1974
+ readonly underlyingConfig: LanguageConfiguration;
1975
+ private _brackets;
1976
+ private _electricCharacter;
1977
+ private readonly _onEnterSupport;
1978
+ readonly comments: ICommentsConfiguration | null;
1979
+ readonly characterPair: CharacterPairSupport;
1980
+ readonly wordDefinition: RegExp;
1981
+ readonly indentRulesSupport: IndentRulesSupport | null;
1982
+ readonly indentationRules: IndentationRule | undefined;
1983
+ readonly foldingRules: FoldingRules;
1984
+ readonly bracketsNew: LanguageBracketsConfiguration;
1985
+ constructor(languageId: string, underlyingConfig: LanguageConfiguration);
1986
+ getWordDefinition(): RegExp;
1987
+ get brackets(): RichEditBrackets | null;
1988
+ get electricCharacter(): BracketElectricCharacterSupport | null;
1989
+ onEnter(autoIndent: EditorAutoIndentStrategy, previousLineText: string, beforeEnterText: string, afterEnterText: string): EnterAction | null;
1990
+ getAutoClosingPairs(): AutoClosingPairs;
1991
+ getAutoCloseBeforeSet(forQuotes: boolean): string;
1992
+ getSurroundingPairs(): IAutoClosingPair[];
1993
+ private static _handleComments;
1994
+ }
1995
+
1996
+ interface IDialogArgs {
1997
+ readonly confirmArgs?: IConfirmDialogArgs;
1998
+ readonly inputArgs?: IInputDialogArgs;
1999
+ readonly promptArgs?: IPromptDialogArgs;
2000
+ }
2001
+ interface IBaseDialogOptions {
2002
+ readonly type?: Severity | DialogType;
2003
+ readonly title?: string;
2004
+ readonly message: string;
2005
+ readonly detail?: string;
2006
+ readonly checkbox?: ICheckbox;
2007
+ /**
2008
+ * Allows to enforce use of custom dialog even in native environments.
2009
+ */
2010
+ readonly custom?: boolean | ICustomDialogOptions;
2011
+ }
2012
+ interface IConfirmDialogArgs {
2013
+ readonly confirmation: IConfirmation;
2014
+ }
2015
+ interface IConfirmation extends IBaseDialogOptions {
2016
+ /**
2017
+ * If not provided, defaults to `Yes`.
2018
+ */
2019
+ readonly primaryButton?: string;
2020
+ /**
2021
+ * If not provided, defaults to `Cancel`.
2022
+ */
2023
+ readonly cancelButton?: string;
2024
+ }
2025
+ interface IConfirmationResult extends ICheckboxResult {
2026
+ /**
2027
+ * Will be true if the dialog was confirmed with the primary button pressed.
2028
+ */
2029
+ readonly confirmed: boolean;
2030
+ }
2031
+ interface IInputDialogArgs {
2032
+ readonly input: IInput;
2033
+ }
2034
+ interface IInput extends IConfirmation {
2035
+ readonly inputs: IInputElement[];
2036
+ /**
2037
+ * If not provided, defaults to `Ok`.
2038
+ */
2039
+ readonly primaryButton?: string;
2040
+ }
2041
+ interface IInputElement {
2042
+ readonly type?: 'text' | 'password';
2043
+ readonly value?: string;
2044
+ readonly placeholder?: string;
2045
+ }
2046
+ interface IInputResult extends IConfirmationResult {
2047
+ /**
2048
+ * Values for the input fields as provided by the user or `undefined` if none.
2049
+ */
2050
+ readonly values?: string[];
2051
+ }
2052
+ interface IPromptDialogArgs {
2053
+ readonly prompt: IPrompt<unknown>;
2054
+ }
2055
+ interface IPromptBaseButton<T> {
2056
+ /**
2057
+ * @returns the result of the prompt button will be returned
2058
+ * as result from the `prompt()` call.
2059
+ */
2060
+ run(checkbox: ICheckboxResult): T | Promise<T>;
2061
+ }
2062
+ interface IPromptButton<T> extends IPromptBaseButton<T> {
2063
+ readonly label: string;
2064
+ }
2065
+ interface IPromptCancelButton<T> extends IPromptBaseButton<T> {
2066
+ /**
2067
+ * The cancel button to show in the prompt. Defaults to
2068
+ * `Cancel` if not provided.
2069
+ */
2070
+ readonly label?: string;
2071
+ }
2072
+ interface IPrompt<T> extends IBaseDialogOptions {
2073
+ /**
2074
+ * The buttons to show in the prompt. Defaults to `OK`
2075
+ * if no buttons or cancel button is provided.
2076
+ */
2077
+ readonly buttons?: IPromptButton<T>[];
2078
+ /**
2079
+ * The cancel button to show in the prompt. Defaults to
2080
+ * `Cancel` if set to `true`.
2081
+ */
2082
+ readonly cancelButton?: IPromptCancelButton<T> | true | string;
2083
+ }
2084
+ interface IPromptWithCustomCancel<T> extends IPrompt<T> {
2085
+ readonly cancelButton: IPromptCancelButton<T>;
2086
+ }
2087
+ interface IPromptWithDefaultCancel<T> extends IPrompt<T> {
2088
+ readonly cancelButton: true | string;
2089
+ }
2090
+ interface IPromptResult<T> extends ICheckboxResult {
2091
+ /**
2092
+ * The result of the `IPromptButton`` that was pressed or `undefined` if none.
2093
+ */
2094
+ readonly result?: T;
2095
+ }
2096
+ interface IPromptResultWithCancel<T> extends IPromptResult<T> {
2097
+ readonly result: T;
2098
+ }
2099
+ type IDialogResult = IConfirmationResult | IInputResult | IPromptResult<unknown>;
2100
+ type DialogType = 'none' | 'info' | 'error' | 'question' | 'warning';
2101
+ interface ICheckbox {
2102
+ readonly label: string;
2103
+ readonly checked?: boolean;
2104
+ }
2105
+ interface ICheckboxResult {
2106
+ /**
2107
+ * This will only be defined if the confirmation was created
2108
+ * with the checkbox option defined.
2109
+ */
2110
+ readonly checkboxChecked?: boolean;
2111
+ }
2112
+ interface ICustomDialogOptions {
2113
+ readonly buttonDetails?: string[];
2114
+ readonly markdownDetails?: ICustomDialogMarkdown[];
2115
+ readonly classes?: string[];
2116
+ readonly icon?: ThemeIcon;
2117
+ readonly disableCloseAction?: boolean;
2118
+ }
2119
+ interface ICustomDialogMarkdown {
2120
+ readonly markdown: IMarkdownString;
2121
+ readonly classes?: string[];
2122
+ }
2123
+ /**
2124
+ * A handler to bring up modal dialogs.
2125
+ */
2126
+ interface IDialogHandler {
2127
+ /**
2128
+ * Ask the user for confirmation with a modal dialog.
2129
+ */
2130
+ confirm(confirmation: IConfirmation): Promise<IConfirmationResult>;
2131
+ /**
2132
+ * Prompt the user with a modal dialog.
2133
+ */
2134
+ prompt<T>(prompt: IPrompt<T>): Promise<IPromptResult<T>>;
2135
+ /**
2136
+ * Present a modal dialog to the user asking for input.
2137
+ */
2138
+ input(input: IInput): Promise<IInputResult>;
2139
+ /**
2140
+ * Present the about dialog to the user.
2141
+ */
2142
+ about(): Promise<void>;
2143
+ }
2144
+ declare const IDialogService: ServiceIdentifier<IDialogService>;
2145
+ /**
2146
+ * A service to bring up modal dialogs.
2147
+ *
2148
+ * Note: use the `INotificationService.prompt()` method for a non-modal way to ask
2149
+ * the user for input.
2150
+ */
2151
+ interface IDialogService {
2152
+ readonly _serviceBrand: undefined;
2153
+ /**
2154
+ * An event that fires when a dialog is about to show.
2155
+ */
2156
+ onWillShowDialog: Event<void>;
2157
+ /**
2158
+ * An event that fires when a dialog did show (closed).
2159
+ */
2160
+ onDidShowDialog: Event<void>;
2161
+ /**
2162
+ * Ask the user for confirmation with a modal dialog.
2163
+ */
2164
+ confirm(confirmation: IConfirmation): Promise<IConfirmationResult>;
2165
+ /**
2166
+ * Prompt the user with a modal dialog. Provides a bit
2167
+ * more control over the dialog compared to the simpler
2168
+ * `confirm` method. Specifically, allows to show more
2169
+ * than 2 buttons and makes it easier to just show a
2170
+ * message to the user.
2171
+ *
2172
+ * @returns a promise that resolves to the `T` result
2173
+ * from the provided `IPromptButton<T>` or `undefined`.
2174
+ */
2175
+ prompt<T>(prompt: IPromptWithCustomCancel<T>): Promise<IPromptResultWithCancel<T>>;
2176
+ prompt<T>(prompt: IPromptWithDefaultCancel<T>): Promise<IPromptResult<T>>;
2177
+ prompt<T>(prompt: IPrompt<T>): Promise<IPromptResult<T>>;
2178
+ /**
2179
+ * Present a modal dialog to the user asking for input.
2180
+ */
2181
+ input(input: IInput): Promise<IInputResult>;
2182
+ /**
2183
+ * Show a modal info dialog.
2184
+ */
2185
+ info(message: string, detail?: string): Promise<void>;
2186
+ /**
2187
+ * Show a modal warning dialog.
2188
+ */
2189
+ warn(message: string, detail?: string): Promise<void>;
2190
+ /**
2191
+ * Show a modal error dialog.
2192
+ */
2193
+ error(message: string, detail?: string): Promise<void>;
2194
+ /**
2195
+ * Present the about dialog to the user.
2196
+ */
2197
+ about(): Promise<void>;
2198
+ }
2199
+ declare const enum ConfirmResult {
2200
+ SAVE = 0,
2201
+ DONT_SAVE = 1,
2202
+ CANCEL = 2
2203
+ }
2204
+
2205
+ interface IEditorCloseHandler {
2206
+ /**
2207
+ * If `true`, will call into the `confirm` method to ask for confirmation
2208
+ * before closing the editor.
2209
+ */
2210
+ showConfirm(): boolean;
2211
+ /**
2212
+ * Allows an editor to control what should happen when the editor
2213
+ * (or a list of editor of the same kind) is being closed.
2214
+ *
2215
+ * By default a file specific dialog will open if the editor is
2216
+ * dirty and not in the process of saving.
2217
+ *
2218
+ * If the editor is not dealing with files or another condition
2219
+ * should be used besides dirty state, this method should be
2220
+ * implemented to show a different dialog.
2221
+ *
2222
+ * @param editors All editors of the same kind that are being closed. Should be used
2223
+ * to show a combined dialog.
2224
+ */
2225
+ confirm(editors: ReadonlyArray<IEditorIdentifier>): Promise<ConfirmResult>;
2226
+ }
2227
+ /**
2228
+ * Editor inputs are lightweight objects that can be passed to the workbench API to open inside the editor part.
2229
+ * Each editor input is mapped to an editor that is capable of opening it through the Platform facade.
2230
+ */
2231
+ declare abstract class EditorInput extends AbstractEditorInput {
2232
+ protected readonly _onDidChangeDirty: Emitter<void>;
2233
+ protected readonly _onDidChangeLabel: Emitter<void>;
2234
+ protected readonly _onDidChangeCapabilities: Emitter<void>;
2235
+ private readonly _onWillDispose;
2236
+ /**
2237
+ * Triggered when this input changes its dirty state.
2238
+ */
2239
+ readonly onDidChangeDirty: Event<void>;
2240
+ /**
2241
+ * Triggered when this input changes its label
2242
+ */
2243
+ readonly onDidChangeLabel: Event<void>;
2244
+ /**
2245
+ * Triggered when this input changes its capabilities.
2246
+ */
2247
+ readonly onDidChangeCapabilities: Event<void>;
2248
+ /**
2249
+ * Triggered when this input is about to be disposed.
2250
+ */
2251
+ readonly onWillDispose: Event<void>;
2252
+ private disposed;
2253
+ /**
2254
+ * Optional: subclasses can override to implement
2255
+ * custom confirmation on close behavior.
2256
+ */
2257
+ readonly closeHandler?: IEditorCloseHandler;
2258
+ /**
2259
+ * Unique type identifier for this input. Every editor input of the
2260
+ * same class should share the same type identifier. The type identifier
2261
+ * is used for example for serialising/deserialising editor inputs
2262
+ * via the serialisers of the `EditorInputFactoryRegistry`.
2263
+ */
2264
+ abstract get typeId(): string;
2265
+ /**
2266
+ * Returns the optional associated resource of this input.
2267
+ *
2268
+ * This resource should be unique for all editors of the same
2269
+ * kind and input and is often used to identify the editor input among
2270
+ * others.
2271
+ *
2272
+ * **Note:** DO NOT use this property for anything but identity
2273
+ * checks. DO NOT use this property to present as label to the user.
2274
+ * Please refer to `EditorResourceAccessor` documentation in that case.
2275
+ */
2276
+ abstract get resource(): URI | undefined;
2277
+ /**
2278
+ * Identifies the type of editor this input represents
2279
+ * This ID is registered with the {@link EditorResolverService} to allow
2280
+ * for resolving an untyped input to a typed one
2281
+ */
2282
+ get editorId(): string | undefined;
2283
+ /**
2284
+ * The capabilities of the input.
2285
+ */
2286
+ get capabilities(): EditorInputCapabilities;
2287
+ /**
2288
+ * Figure out if the input has the provided capability.
2289
+ */
2290
+ hasCapability(capability: EditorInputCapabilities): boolean;
2291
+ /**
2292
+ * Returns the display name of this input.
2293
+ */
2294
+ getName(): string;
2295
+ /**
2296
+ * Returns the display description of this input.
2297
+ */
2298
+ getDescription(verbosity?: Verbosity): string | undefined;
2299
+ /**
2300
+ * Returns the display title of this input.
2301
+ */
2302
+ getTitle(verbosity?: Verbosity): string;
2303
+ /**
2304
+ * Returns the extra classes to apply to the label of this input.
2305
+ */
2306
+ getLabelExtraClasses(): string[];
2307
+ /**
2308
+ * Returns the aria label to be read out by a screen reader.
2309
+ */
2310
+ getAriaLabel(): string;
2311
+ /**
2312
+ * Returns a descriptor suitable for telemetry events.
2313
+ *
2314
+ * Subclasses should extend if they can contribute.
2315
+ */
2316
+ getTelemetryDescriptor(): {
2317
+ [key: string]: unknown;
2318
+ };
2319
+ /**
2320
+ * Returns if this input is dirty or not.
2321
+ */
2322
+ isDirty(): boolean;
2323
+ /**
2324
+ * Returns if this input is currently being saved or soon to be
2325
+ * saved. Based on this assumption the editor may for example
2326
+ * decide to not signal the dirty state to the user assuming that
2327
+ * the save is scheduled to happen anyway.
2328
+ */
2329
+ isSaving(): boolean;
2330
+ /**
2331
+ * Returns a type of `IEditorModel` that represents the resolved input.
2332
+ * Subclasses should override to provide a meaningful model or return
2333
+ * `null` if the editor does not require a model.
2334
+ *
2335
+ * The `options` parameter are passed down from the editor when the
2336
+ * input is resolved as part of it.
2337
+ */
2338
+ resolve(options?: IEditorOptions): Promise<IEditorModel | null>;
2339
+ /**
2340
+ * Saves the editor. The provided groupId helps implementors
2341
+ * to e.g. preserve view state of the editor and re-open it
2342
+ * in the correct group after saving.
2343
+ *
2344
+ * @returns the resulting editor input (typically the same) of
2345
+ * this operation or `undefined` to indicate that the operation
2346
+ * failed or was canceled.
2347
+ */
2348
+ save(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | IUntypedEditorInput | undefined>;
2349
+ /**
2350
+ * Saves the editor to a different location. The provided `group`
2351
+ * helps implementors to e.g. preserve view state of the editor
2352
+ * and re-open it in the correct group after saving.
2353
+ *
2354
+ * @returns the resulting editor input (typically a different one)
2355
+ * of this operation or `undefined` to indicate that the operation
2356
+ * failed or was canceled.
2357
+ */
2358
+ saveAs(group: GroupIdentifier, options?: ISaveOptions): Promise<EditorInput | IUntypedEditorInput | undefined>;
2359
+ /**
2360
+ * Reverts this input from the provided group.
2361
+ */
2362
+ revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void>;
2363
+ /**
2364
+ * Called to determine how to handle a resource that is renamed that matches
2365
+ * the editors resource (or is a child of).
2366
+ *
2367
+ * Implementors are free to not implement this method to signal no intent
2368
+ * to participate. If an editor is returned though, it will replace the
2369
+ * current one with that editor and optional options.
2370
+ */
2371
+ rename(group: GroupIdentifier, target: URI): Promise<IMoveResult | undefined>;
2372
+ /**
2373
+ * Returns a copy of the current editor input. Used when we can't just reuse the input
2374
+ */
2375
+ copy(): EditorInput;
2376
+ /**
2377
+ * Returns if the other object matches this input.
2378
+ */
2379
+ matches(otherInput: EditorInput | IUntypedEditorInput): boolean;
2380
+ /**
2381
+ * If a editor was registered onto multiple editor panes, this method
2382
+ * will be asked to return the preferred one to use.
2383
+ *
2384
+ * @param editorPanes a list of editor pane descriptors that are candidates
2385
+ * for the editor to open in.
2386
+ */
2387
+ prefersEditorPane<T extends IEditorDescriptor<IEditorPane>>(editorPanes: T[]): T | undefined;
2388
+ /**
2389
+ * Returns a representation of this typed editor input as untyped
2390
+ * resource editor input that e.g. can be used to serialize the
2391
+ * editor input into a form that it can be restored.
2392
+ *
2393
+ * May return `undefined` if an untyped representation is not supported.
2394
+ *
2395
+ * @param options additional configuration for the expected return type.
2396
+ * When `preserveViewState` is provided, implementations should try to
2397
+ * preserve as much view state as possible from the typed input based on
2398
+ * the group the editor is opened.
2399
+ */
2400
+ toUntyped(options?: {
2401
+ preserveViewState: GroupIdentifier;
2402
+ }): IUntypedEditorInput | undefined;
2403
+ /**
2404
+ * Returns if this editor is disposed.
2405
+ */
2406
+ isDisposed(): boolean;
2407
+ dispose(): void;
2408
+ }
2409
+
2410
+ declare const enum WorkingCopyCapabilities {
2411
+ /**
2412
+ * Signals no specific capability for the working copy.
2413
+ */
2414
+ None = 0,
2415
+ /**
2416
+ * Signals that the working copy requires
2417
+ * additional input when saving, e.g. an
2418
+ * associated path to save to.
2419
+ */
2420
+ Untitled = 2
2421
+ }
2422
+ /**
2423
+ * Data to be associated with working copy backups. Use
2424
+ * `IWorkingCopyBackupService.resolve(workingCopy)` to
2425
+ * retrieve the backup when loading the working copy.
2426
+ */
2427
+ interface IWorkingCopyBackup {
2428
+ /**
2429
+ * Any serializable metadata to be associated with the backup.
2430
+ */
2431
+ meta?: IWorkingCopyBackupMeta;
2432
+ /**
2433
+ * The actual snapshot of the contents of the working copy at
2434
+ * the time the backup was made.
2435
+ */
2436
+ content?: VSBufferReadable | VSBufferReadableStream;
2437
+ }
2438
+ /**
2439
+ * Working copy backup metadata that can be associated
2440
+ * with the backup.
2441
+ *
2442
+ * Some properties may be reserved as outlined here and
2443
+ * cannot be used.
2444
+ */
2445
+ interface IWorkingCopyBackupMeta {
2446
+ /**
2447
+ * Any property needs to be serializable through JSON.
2448
+ */
2449
+ [key: string]: unknown;
2450
+ /**
2451
+ * `typeId` is a reserved property that cannot be used
2452
+ * as backup metadata.
2453
+ */
2454
+ typeId?: never;
2455
+ }
2456
+ /**
2457
+ * Every working copy has in common that it is identified by
2458
+ * a resource `URI` and a `typeId`. There can only be one
2459
+ * working copy registered with the same `URI` and `typeId`.
2460
+ */
2461
+ interface IWorkingCopyIdentifier {
2462
+ /**
2463
+ * The type identifier of the working copy for grouping
2464
+ * working copies of the same domain together.
2465
+ *
2466
+ * There can only be one working copy for a given resource
2467
+ * and type identifier.
2468
+ */
2469
+ readonly typeId: string;
2470
+ /**
2471
+ * The resource of the working copy must be unique for
2472
+ * working copies of the same `typeId`.
2473
+ */
2474
+ readonly resource: URI;
2475
+ }
2476
+ interface IWorkingCopySaveEvent {
2477
+ /**
2478
+ * The reason why the working copy was saved.
2479
+ */
2480
+ readonly reason?: SaveReason;
2481
+ /**
2482
+ * The source of the working copy save request.
2483
+ */
2484
+ readonly source?: SaveSource;
2485
+ }
2486
+ /**
2487
+ * A working copy is an abstract concept to unify handling of
2488
+ * data that can be worked on (e.g. edited) in an editor.
2489
+ *
2490
+ *
2491
+ * A working copy resource may be the backing store of the data
2492
+ * (e.g. a file on disk), but that is not a requirement. If
2493
+ * your working copy is file based, consider to use the
2494
+ * `IFileWorkingCopy` instead that simplifies a lot of things
2495
+ * when working with file based working copies.
2496
+ */
2497
+ interface IWorkingCopy extends IWorkingCopyIdentifier {
2498
+ /**
2499
+ * Human readable name of the working copy.
2500
+ */
2501
+ readonly name: string;
2502
+ /**
2503
+ * The capabilities of the working copy.
2504
+ */
2505
+ readonly capabilities: WorkingCopyCapabilities;
2506
+ /**
2507
+ * Used by the workbench to signal if the working copy
2508
+ * is dirty or not. Typically a working copy is dirty
2509
+ * once changed until saved or reverted.
2510
+ */
2511
+ readonly onDidChangeDirty: Event<void>;
2512
+ /**
2513
+ * Used by the workbench e.g. to trigger auto-save
2514
+ * (unless this working copy is untitled) and backups.
2515
+ */
2516
+ readonly onDidChangeContent: Event<void>;
2517
+ /**
2518
+ * Used by the workbench e.g. to track local history
2519
+ * (unless this working copy is untitled).
2520
+ */
2521
+ readonly onDidSave: Event<IWorkingCopySaveEvent>;
2522
+ isDirty(): boolean;
2523
+ /**
2524
+ * The workbench may call this method often after it receives
2525
+ * the `onDidChangeContent` event for the working copy. The motivation
2526
+ * is to allow to quit VSCode with dirty working copies present.
2527
+ *
2528
+ * Providers of working copies should use `IWorkingCopyBackupService.resolve(workingCopy)`
2529
+ * to retrieve the backup metadata associated when loading the working copy.
2530
+ *
2531
+ * @param token support for cancellation
2532
+ */
2533
+ backup(token: CancellationToken): Promise<IWorkingCopyBackup>;
2534
+ /**
2535
+ * Asks the working copy to save. If the working copy was dirty, it is
2536
+ * expected to be non-dirty after this operation has finished.
2537
+ *
2538
+ * @returns `true` if the operation was successful and `false` otherwise.
2539
+ */
2540
+ save(options?: ISaveOptions): Promise<boolean>;
2541
+ /**
2542
+ * Asks the working copy to revert. If the working copy was dirty, it is
2543
+ * expected to be non-dirty after this operation has finished.
2544
+ */
2545
+ revert(options?: IRevertOptions): Promise<void>;
2546
+ }
2547
+
2548
+ interface IGroupModelChangeEvent {
2549
+ /**
2550
+ * The kind of change that occurred in the group model.
2551
+ */
2552
+ readonly kind: GroupModelChangeKind;
2553
+ /**
2554
+ * Only applies when editors change providing
2555
+ * access to the editor the event is about.
2556
+ */
2557
+ readonly editor?: EditorInput;
2558
+ /**
2559
+ * Only applies when editors change providing
2560
+ * access to the index of the editor the event
2561
+ * is about.
2562
+ */
2563
+ readonly editorIndex?: number;
2564
+ }
2565
+
2566
+ declare const enum GroupDirection {
2567
+ UP = 0,
2568
+ DOWN = 1,
2569
+ LEFT = 2,
2570
+ RIGHT = 3
2571
+ }
2572
+ declare const enum GroupOrientation {
2573
+ HORIZONTAL = 0,
2574
+ VERTICAL = 1
2575
+ }
2576
+ declare const enum GroupLocation {
2577
+ FIRST = 0,
2578
+ LAST = 1,
2579
+ NEXT = 2,
2580
+ PREVIOUS = 3
2581
+ }
2582
+ interface IFindGroupScope {
2583
+ direction?: GroupDirection;
2584
+ location?: GroupLocation;
2585
+ }
2586
+ declare const enum GroupsArrangement {
2587
+ /**
2588
+ * Make the current active group consume the maximum
2589
+ * amount of space possible.
2590
+ */
2591
+ MAXIMIZE = 0,
2592
+ /**
2593
+ * Size all groups evenly.
2594
+ */
2595
+ EVEN = 1,
2596
+ /**
2597
+ * Will behave like MINIMIZE_OTHERS if the active
2598
+ * group is not already maximized and EVEN otherwise
2599
+ */
2600
+ TOGGLE = 2
2601
+ }
2602
+ interface GroupLayoutArgument {
2603
+ /**
2604
+ * Only applies when there are multiple groups
2605
+ * arranged next to each other in a row or column.
2606
+ * If provided, their sum must be 1 to be applied
2607
+ * per row or column.
2608
+ */
2609
+ size?: number;
2610
+ /**
2611
+ * Editor groups will be laid out orthogonal to the
2612
+ * parent orientation.
2613
+ */
2614
+ groups?: GroupLayoutArgument[];
2615
+ }
2616
+ interface EditorGroupLayout {
2617
+ /**
2618
+ * The initial orientation of the editor groups at the root.
2619
+ */
2620
+ orientation: GroupOrientation;
2621
+ /**
2622
+ * The editor groups at the root of the layout.
2623
+ */
2624
+ groups: GroupLayoutArgument[];
2625
+ }
2626
+ interface IAddGroupOptions {
2627
+ activate?: boolean;
2628
+ }
2629
+ declare const enum MergeGroupMode {
2630
+ COPY_EDITORS = 0,
2631
+ MOVE_EDITORS = 1
2632
+ }
2633
+ interface IMergeGroupOptions {
2634
+ mode?: MergeGroupMode;
2635
+ index?: number;
2636
+ }
2637
+ interface ICloseEditorOptions {
2638
+ preserveFocus?: boolean;
2639
+ }
2640
+ type ICloseEditorsFilter = {
2641
+ except?: EditorInput;
2642
+ direction?: CloseDirection;
2643
+ savedOnly?: boolean;
2644
+ excludeSticky?: boolean;
2645
+ };
2646
+ interface ICloseAllEditorsOptions {
2647
+ excludeSticky?: boolean;
2648
+ }
2649
+ interface IEditorReplacement {
2650
+ editor: EditorInput;
2651
+ replacement: EditorInput;
2652
+ options?: IEditorOptions;
2653
+ /**
2654
+ * Skips asking the user for confirmation and doesn't
2655
+ * save the document. Only use this if you really need to!
2656
+ */
2657
+ forceReplaceDirty?: boolean;
2658
+ }
2659
+ declare const enum GroupsOrder {
2660
+ /**
2661
+ * Groups sorted by creation order (oldest one first)
2662
+ */
2663
+ CREATION_TIME = 0,
2664
+ /**
2665
+ * Groups sorted by most recent activity (most recent active first)
2666
+ */
2667
+ MOST_RECENTLY_ACTIVE = 1,
2668
+ /**
2669
+ * Groups sorted by grid widget order
2670
+ */
2671
+ GRID_APPEARANCE = 2
2672
+ }
2673
+ interface IEditorSideGroup {
2674
+ /**
2675
+ * Open an editor in this group.
2676
+ *
2677
+ * @returns a promise that resolves around an IEditor instance unless
2678
+ * the call failed, or the editor was not opened as active editor.
2679
+ */
2680
+ openEditor(editor: EditorInput, options?: IEditorOptions): Promise<IEditorPane | undefined>;
2681
+ }
2682
+
2683
+ declare const IEditorGroupsService: ServiceIdentifier<IEditorGroupsService>;
2684
+ interface IEditorGroupsService {
2685
+ readonly _serviceBrand: undefined;
2686
+ /**
2687
+ * An event for when the active editor group changes. The active editor
2688
+ * group is the default location for new editors to open.
2689
+ */
2690
+ readonly onDidChangeActiveGroup: Event<IEditorGroup>;
2691
+ /**
2692
+ * An event for when a new group was added.
2693
+ */
2694
+ readonly onDidAddGroup: Event<IEditorGroup>;
2695
+ /**
2696
+ * An event for when a group was removed.
2697
+ */
2698
+ readonly onDidRemoveGroup: Event<IEditorGroup>;
2699
+ /**
2700
+ * An event for when a group was moved.
2701
+ */
2702
+ readonly onDidMoveGroup: Event<IEditorGroup>;
2703
+ /**
2704
+ * An event for when a group gets activated.
2705
+ */
2706
+ readonly onDidActivateGroup: Event<IEditorGroup>;
2707
+ /**
2708
+ * An event for when the group container is layed out.
2709
+ */
2710
+ readonly onDidLayout: Event<IDimension>;
2711
+ /**
2712
+ * An event for when the group container is scrolled.
2713
+ */
2714
+ readonly onDidScroll: Event<void>;
2715
+ /**
2716
+ * An event for when the index of a group changes.
2717
+ */
2718
+ readonly onDidChangeGroupIndex: Event<IEditorGroup>;
2719
+ /**
2720
+ * An event for when the locked state of a group changes.
2721
+ */
2722
+ readonly onDidChangeGroupLocked: Event<IEditorGroup>;
2723
+ /**
2724
+ * The size of the editor groups area.
2725
+ */
2726
+ readonly contentDimension: IDimension;
2727
+ /**
2728
+ * An active group is the default location for new editors to open.
2729
+ */
2730
+ readonly activeGroup: IEditorGroup;
2731
+ /**
2732
+ * A side group allows a subset of methods on a group that is either
2733
+ * created to the side or picked if already there.
2734
+ */
2735
+ readonly sideGroup: IEditorSideGroup;
2736
+ /**
2737
+ * All groups that are currently visible in the editor area in the
2738
+ * order of their creation (oldest first).
2739
+ */
2740
+ readonly groups: readonly IEditorGroup[];
2741
+ /**
2742
+ * The number of editor groups that are currently opened.
2743
+ */
2744
+ readonly count: number;
2745
+ /**
2746
+ * The current layout orientation of the root group.
2747
+ */
2748
+ readonly orientation: GroupOrientation;
2749
+ /**
2750
+ * A property that indicates when groups have been created
2751
+ * and are ready to be used.
2752
+ */
2753
+ readonly isReady: boolean;
2754
+ /**
2755
+ * A promise that resolves when groups have been created
2756
+ * and are ready to be used.
2757
+ *
2758
+ * Await this promise to safely work on the editor groups model
2759
+ * (for example, install editor group listeners).
2760
+ *
2761
+ * Use the `whenRestored` property to await visible editors
2762
+ * having fully resolved.
2763
+ */
2764
+ readonly whenReady: Promise<void>;
2765
+ /**
2766
+ * A promise that resolves when groups have been restored.
2767
+ *
2768
+ * For groups with active editor, the promise will resolve
2769
+ * when the visible editor has finished to resolve.
2770
+ *
2771
+ * Use the `whenReady` property to not await editors to
2772
+ * resolve.
2773
+ */
2774
+ readonly whenRestored: Promise<void>;
2775
+ /**
2776
+ * Find out if the editor group service has UI state to restore
2777
+ * from a previous session.
2778
+ */
2779
+ readonly hasRestorableState: boolean;
2780
+ /**
2781
+ * Get all groups that are currently visible in the editor area.
2782
+ *
2783
+ * @param order the order of the editors to use
2784
+ */
2785
+ getGroups(order: GroupsOrder): readonly IEditorGroup[];
2786
+ /**
2787
+ * Allows to convert a group identifier to a group.
2788
+ */
2789
+ getGroup(identifier: GroupIdentifier): IEditorGroup | undefined;
2790
+ /**
2791
+ * Set a group as active. An active group is the default location for new editors to open.
2792
+ */
2793
+ activateGroup(group: IEditorGroup | GroupIdentifier): IEditorGroup;
2794
+ /**
2795
+ * Returns the size of a group.
2796
+ */
2797
+ getSize(group: IEditorGroup | GroupIdentifier): {
2798
+ width: number;
2799
+ height: number;
2800
+ };
2801
+ /**
2802
+ * Sets the size of a group.
2803
+ */
2804
+ setSize(group: IEditorGroup | GroupIdentifier, size: {
2805
+ width: number;
2806
+ height: number;
2807
+ }): void;
2808
+ /**
2809
+ * Arrange all groups according to the provided arrangement.
2810
+ */
2811
+ arrangeGroups(arrangement: GroupsArrangement): void;
2812
+ /**
2813
+ * Applies the provided layout by either moving existing groups or creating new groups.
2814
+ */
2815
+ applyLayout(layout: EditorGroupLayout): void;
2816
+ /**
2817
+ * Returns an editor layout describing the current grid
2818
+ */
2819
+ getLayout(): EditorGroupLayout;
2820
+ /**
2821
+ * Enable or disable centered editor layout.
2822
+ */
2823
+ centerLayout(active: boolean): void;
2824
+ /**
2825
+ * Find out if the editor layout is currently centered.
2826
+ */
2827
+ isLayoutCentered(): boolean;
2828
+ /**
2829
+ * Sets the orientation of the root group to be either vertical or horizontal.
2830
+ */
2831
+ setGroupOrientation(orientation: GroupOrientation): void;
2832
+ /**
2833
+ * Find a group in a specific scope:
2834
+ * * `GroupLocation.FIRST`: the first group
2835
+ * * `GroupLocation.LAST`: the last group
2836
+ * * `GroupLocation.NEXT`: the next group from either the active one or `source`
2837
+ * * `GroupLocation.PREVIOUS`: the previous group from either the active one or `source`
2838
+ * * `GroupDirection.UP`: the next group above the active one or `source`
2839
+ * * `GroupDirection.DOWN`: the next group below the active one or `source`
2840
+ * * `GroupDirection.LEFT`: the next group to the left of the active one or `source`
2841
+ * * `GroupDirection.RIGHT`: the next group to the right of the active one or `source`
2842
+ *
2843
+ * @param scope the scope of the group to search in
2844
+ * @param source optional source to search from
2845
+ * @param wrap optionally wrap around if reaching the edge of groups
2846
+ */
2847
+ findGroup(scope: IFindGroupScope, source?: IEditorGroup | GroupIdentifier, wrap?: boolean): IEditorGroup | undefined;
2848
+ /**
2849
+ * Add a new group to the editor area. A new group is added by splitting a provided one in
2850
+ * one of the four directions.
2851
+ *
2852
+ * @param location the group from which to split to add a new group
2853
+ * @param direction the direction of where to split to
2854
+ * @param options configure the newly group with options
2855
+ */
2856
+ addGroup(location: IEditorGroup | GroupIdentifier, direction: GroupDirection, options?: IAddGroupOptions): IEditorGroup;
2857
+ /**
2858
+ * Remove a group from the editor area.
2859
+ */
2860
+ removeGroup(group: IEditorGroup | GroupIdentifier): void;
2861
+ /**
2862
+ * Move a group to a new group in the editor area.
2863
+ *
2864
+ * @param group the group to move
2865
+ * @param location the group from which to split to add the moved group
2866
+ * @param direction the direction of where to split to
2867
+ */
2868
+ moveGroup(group: IEditorGroup | GroupIdentifier, location: IEditorGroup | GroupIdentifier, direction: GroupDirection): IEditorGroup;
2869
+ /**
2870
+ * Merge the editors of a group into a target group. By default, all editors will
2871
+ * move and the source group will close. This behaviour can be configured via the
2872
+ * `IMergeGroupOptions` options.
2873
+ *
2874
+ * @param group the group to merge
2875
+ * @param target the target group to merge into
2876
+ * @param options controls how the merge should be performed. by default all editors
2877
+ * will be moved over to the target and the source group will close. Configure to
2878
+ * `MOVE_EDITORS_KEEP_GROUP` to prevent the source group from closing. Set to
2879
+ * `COPY_EDITORS` to copy the editors into the target instead of moding them.
2880
+ */
2881
+ mergeGroup(group: IEditorGroup | GroupIdentifier, target: IEditorGroup | GroupIdentifier, options?: IMergeGroupOptions): IEditorGroup;
2882
+ /**
2883
+ * Merge all editor groups into the active one.
2884
+ */
2885
+ mergeAllGroups(): IEditorGroup;
2886
+ /**
2887
+ * Copy a group to a new group in the editor area.
2888
+ *
2889
+ * @param group the group to copy
2890
+ * @param location the group from which to split to add the copied group
2891
+ * @param direction the direction of where to split to
2892
+ */
2893
+ copyGroup(group: IEditorGroup | GroupIdentifier, location: IEditorGroup | GroupIdentifier, direction: GroupDirection): IEditorGroup;
2894
+ /**
2895
+ * Access the options of the editor part.
2896
+ */
2897
+ readonly partOptions: IEditorPartOptions;
2898
+ /**
2899
+ * An event that notifies when editor part options change.
2900
+ */
2901
+ readonly onDidChangeEditorPartOptions: Event<IEditorPartOptionsChangeEvent>;
2902
+ /**
2903
+ * Enforce editor part options temporarily.
2904
+ */
2905
+ enforcePartOptions(options: IEditorPartOptions): IDisposable;
2906
+ }
2907
+ interface IEditorGroup {
2908
+ /**
2909
+ * An event which fires whenever the underlying group model changes.
2910
+ */
2911
+ readonly onDidModelChange: Event<IGroupModelChangeEvent>;
2912
+ /**
2913
+ * An event that is fired when the group gets disposed.
2914
+ */
2915
+ readonly onWillDispose: Event<void>;
2916
+ /**
2917
+ * An event that is fired when the active editor in the group changed.
2918
+ */
2919
+ readonly onDidActiveEditorChange: Event<IActiveEditorChangeEvent>;
2920
+ /**
2921
+ * An event that is fired when an editor is about to close.
2922
+ */
2923
+ readonly onWillCloseEditor: Event<IEditorCloseEvent>;
2924
+ /**
2925
+ * An event that is fired when an editor is closed.
2926
+ */
2927
+ readonly onDidCloseEditor: Event<IEditorCloseEvent>;
2928
+ /**
2929
+ * An event that is fired when an editor is about to move to
2930
+ * a different group.
2931
+ */
2932
+ readonly onWillMoveEditor: Event<IEditorWillMoveEvent>;
2933
+ /**
2934
+ * An event that is fired when an editor is about to be opened
2935
+ * in the group.
2936
+ */
2937
+ readonly onWillOpenEditor: Event<IEditorWillOpenEvent>;
2938
+ /**
2939
+ * A unique identifier of this group that remains identical even if the
2940
+ * group is moved to different locations.
2941
+ */
2942
+ readonly id: GroupIdentifier;
2943
+ /**
2944
+ * A number that indicates the position of this group in the visual
2945
+ * order of groups from left to right and top to bottom. The lowest
2946
+ * index will likely be top-left while the largest index in most
2947
+ * cases should be bottom-right, but that depends on the grid.
2948
+ */
2949
+ readonly index: number;
2950
+ /**
2951
+ * A human readable label for the group. This label can change depending
2952
+ * on the layout of all editor groups. Clients should listen on the
2953
+ * `onDidGroupModelChange` event to react to that.
2954
+ */
2955
+ readonly label: string;
2956
+ /**
2957
+ * A human readable label for the group to be used by screen readers.
2958
+ */
2959
+ readonly ariaLabel: string;
2960
+ /**
2961
+ * The active editor pane is the currently visible editor pane of the group.
2962
+ */
2963
+ readonly activeEditorPane: IVisibleEditorPane | undefined;
2964
+ /**
2965
+ * The active editor is the currently visible editor of the group
2966
+ * within the current active editor pane.
2967
+ */
2968
+ readonly activeEditor: EditorInput | null;
2969
+ /**
2970
+ * The editor in the group that is in preview mode if any. There can
2971
+ * only ever be one editor in preview mode.
2972
+ */
2973
+ readonly previewEditor: EditorInput | null;
2974
+ /**
2975
+ * The number of opened editors in this group.
2976
+ */
2977
+ readonly count: number;
2978
+ /**
2979
+ * Whether the group has editors or not.
2980
+ */
2981
+ readonly isEmpty: boolean;
2982
+ /**
2983
+ * Whether this editor group is locked or not. Locked editor groups
2984
+ * will only be considered for editors to open in when the group is
2985
+ * explicitly provided for the editor.
2986
+ *
2987
+ * Note: editor group locking only applies when more than one group
2988
+ * is opened.
2989
+ */
2990
+ readonly isLocked: boolean;
2991
+ /**
2992
+ * The number of sticky editors in this group.
2993
+ */
2994
+ readonly stickyCount: number;
2995
+ /**
2996
+ * All opened editors in the group in sequential order of their appearance.
2997
+ */
2998
+ readonly editors: readonly EditorInput[];
2999
+ /**
3000
+ * The scoped context key service for this group.
3001
+ */
3002
+ readonly scopedContextKeyService: IContextKeyService;
3003
+ /**
3004
+ * Get all editors that are currently opened in the group.
3005
+ *
3006
+ * @param order the order of the editors to use
3007
+ * @param options options to select only specific editors as instructed
3008
+ */
3009
+ getEditors(order: EditorsOrder, options?: {
3010
+ excludeSticky?: boolean;
3011
+ }): readonly EditorInput[];
3012
+ /**
3013
+ * Finds all editors for the given resource that are currently
3014
+ * opened in the group. This method will return an entry for
3015
+ * each editor that reports a `resource` that matches the
3016
+ * provided one.
3017
+ *
3018
+ * @param resource the resource of the editor to find
3019
+ * @param options whether to support side by side editors or not
3020
+ */
3021
+ findEditors(resource: URI, options?: IFindEditorOptions): readonly EditorInput[];
3022
+ /**
3023
+ * Returns the editor at a specific index of the group.
3024
+ */
3025
+ getEditorByIndex(index: number): EditorInput | undefined;
3026
+ /**
3027
+ * Returns the index of the editor in the group or -1 if not opened.
3028
+ */
3029
+ getIndexOfEditor(editor: EditorInput): number;
3030
+ /**
3031
+ * Whether the editor is the first in the group.
3032
+ */
3033
+ isFirst(editor: EditorInput): boolean;
3034
+ /**
3035
+ * Whether the editor is the last in the group.
3036
+ */
3037
+ isLast(editor: EditorInput): boolean;
3038
+ /**
3039
+ * Open an editor in this group.
3040
+ *
3041
+ * @returns a promise that resolves around an IEditor instance unless
3042
+ * the call failed, or the editor was not opened as active editor.
3043
+ */
3044
+ openEditor(editor: EditorInput, options?: IEditorOptions): Promise<IEditorPane | undefined>;
3045
+ /**
3046
+ * Opens editors in this group.
3047
+ *
3048
+ * @returns a promise that resolves around an IEditor instance unless
3049
+ * the call failed, or the editor was not opened as active editor. Since
3050
+ * a group can only ever have one active editor, even if many editors are
3051
+ * opened, the result will only be one editor.
3052
+ */
3053
+ openEditors(editors: EditorInputWithOptions[]): Promise<IEditorPane | undefined>;
3054
+ /**
3055
+ * Find out if the provided editor is pinned in the group.
3056
+ */
3057
+ isPinned(editorOrIndex: EditorInput | number): boolean;
3058
+ /**
3059
+ * Find out if the provided editor or index of editor is sticky in the group.
3060
+ */
3061
+ isSticky(editorOrIndex: EditorInput | number): boolean;
3062
+ /**
3063
+ * Find out if the provided editor is active in the group.
3064
+ */
3065
+ isActive(editor: EditorInput | IUntypedEditorInput): boolean;
3066
+ /**
3067
+ * Find out if a certain editor is included in the group.
3068
+ *
3069
+ * @param candidate the editor to find
3070
+ * @param options fine tune how to match editors
3071
+ */
3072
+ contains(candidate: EditorInput | IUntypedEditorInput, options?: IMatchEditorOptions): boolean;
3073
+ /**
3074
+ * Move an editor from this group either within this group or to another group.
3075
+ */
3076
+ moveEditor(editor: EditorInput, target: IEditorGroup, options?: IEditorOptions): void;
3077
+ /**
3078
+ * Move editors from this group either within this group or to another group.
3079
+ */
3080
+ moveEditors(editors: EditorInputWithOptions[], target: IEditorGroup): void;
3081
+ /**
3082
+ * Copy an editor from this group to another group.
3083
+ *
3084
+ * Note: It is currently not supported to show the same editor more than once in the same group.
3085
+ */
3086
+ copyEditor(editor: EditorInput, target: IEditorGroup, options?: IEditorOptions): void;
3087
+ /**
3088
+ * Copy editors from this group to another group.
3089
+ *
3090
+ * Note: It is currently not supported to show the same editor more than once in the same group.
3091
+ */
3092
+ copyEditors(editors: EditorInputWithOptions[], target: IEditorGroup): void;
3093
+ /**
3094
+ * Close an editor from the group. This may trigger a confirmation dialog if
3095
+ * the editor is dirty and thus returns a promise as value.
3096
+ *
3097
+ * @param editor the editor to close, or the currently active editor
3098
+ * if unspecified.
3099
+ *
3100
+ * @returns a promise when the editor is closed or not. If `true`, the editor
3101
+ * is closed and if `false` there was a veto closing the editor, e.g. when it
3102
+ * is dirty.
3103
+ */
3104
+ closeEditor(editor?: EditorInput, options?: ICloseEditorOptions): Promise<boolean>;
3105
+ /**
3106
+ * Closes specific editors in this group. This may trigger a confirmation dialog if
3107
+ * there are dirty editors and thus returns a promise as value.
3108
+ *
3109
+ * @returns a promise whether the editors were closed or not. If `true`, the editors
3110
+ * were closed and if `false` there was a veto closing the editors, e.g. when one
3111
+ * is dirty.
3112
+ */
3113
+ closeEditors(editors: EditorInput[] | ICloseEditorsFilter, options?: ICloseEditorOptions): Promise<boolean>;
3114
+ /**
3115
+ * Closes all editors from the group. This may trigger a confirmation dialog if
3116
+ * there are dirty editors and thus returns a promise as value.
3117
+ *
3118
+ * @returns a promise when all editors are closed.
3119
+ */
3120
+ closeAllEditors(options?: ICloseAllEditorsOptions): Promise<boolean>;
3121
+ /**
3122
+ * Replaces editors in this group with the provided replacement.
3123
+ *
3124
+ * @param editors the editors to replace
3125
+ *
3126
+ * @returns a promise that is resolved when the replaced active
3127
+ * editor (if any) has finished loading.
3128
+ */
3129
+ replaceEditors(editors: IEditorReplacement[]): Promise<void>;
3130
+ /**
3131
+ * Set an editor to be pinned. A pinned editor is not replaced
3132
+ * when another editor opens at the same location.
3133
+ *
3134
+ * @param editor the editor to pin, or the currently active editor
3135
+ * if unspecified.
3136
+ */
3137
+ pinEditor(editor?: EditorInput): void;
3138
+ /**
3139
+ * Set an editor to be sticky. A sticky editor is showing in the beginning
3140
+ * of the tab stripe and will not be impacted by close operations.
3141
+ *
3142
+ * @param editor the editor to make sticky, or the currently active editor
3143
+ * if unspecified.
3144
+ */
3145
+ stickEditor(editor?: EditorInput): void;
3146
+ /**
3147
+ * Set an editor to be non-sticky and thus moves back to a location after
3148
+ * sticky editors and can be closed normally.
3149
+ *
3150
+ * @param editor the editor to make unsticky, or the currently active editor
3151
+ * if unspecified.
3152
+ */
3153
+ unstickEditor(editor?: EditorInput): void;
3154
+ /**
3155
+ * Whether this editor group should be locked or not.
3156
+ *
3157
+ * See {@linkcode IEditorGroup.isLocked `isLocked`}
3158
+ */
3159
+ lock(locked: boolean): void;
3160
+ /**
3161
+ * Move keyboard focus into the group.
3162
+ */
3163
+ focus(): void;
3164
+ }
3165
+
3166
+ interface IUntitledTextEditorModel extends ITextEditorModel, ILanguageSupport, IEncodingSupport, IWorkingCopy {
3167
+ /**
3168
+ * Emits an event when the encoding of this untitled model changes.
3169
+ */
3170
+ readonly onDidChangeEncoding: Event<void>;
3171
+ /**
3172
+ * Emits an event when the name of this untitled model changes.
3173
+ */
3174
+ readonly onDidChangeName: Event<void>;
3175
+ /**
3176
+ * Emits an event when this untitled model is reverted.
3177
+ */
3178
+ readonly onDidRevert: Event<void>;
3179
+ /**
3180
+ * Whether this untitled text model has an associated file path.
3181
+ */
3182
+ readonly hasAssociatedFilePath: boolean;
3183
+ /**
3184
+ * Whether this model has an explicit language or not.
3185
+ */
3186
+ readonly hasLanguageSetExplicitly: boolean;
3187
+ /**
3188
+ * Sets the encoding to use for this untitled model.
3189
+ */
3190
+ setEncoding(encoding: string): Promise<void>;
3191
+ /**
3192
+ * Resolves the untitled model.
3193
+ */
3194
+ resolve(): Promise<void>;
3195
+ }
3196
+
3197
+ interface INewUntitledTextEditorOptions {
3198
+ /**
3199
+ * Initial value of the untitled editor. An untitled editor with initial
3200
+ * value is dirty right from the beginning.
3201
+ */
3202
+ initialValue?: string;
3203
+ /**
3204
+ * Preferred language id to use when saving the untitled editor.
3205
+ */
3206
+ languageId?: string;
3207
+ /**
3208
+ * Preferred encoding to use when saving the untitled editor.
3209
+ */
3210
+ encoding?: string;
3211
+ }
3212
+ interface IExistingUntitledTextEditorOptions extends INewUntitledTextEditorOptions {
3213
+ /**
3214
+ * A resource to identify the untitled editor to create or return
3215
+ * if already existing.
3216
+ *
3217
+ * Note: the resource will not be used unless the scheme is `untitled`.
3218
+ */
3219
+ untitledResource?: URI;
3220
+ }
3221
+ interface INewUntitledTextEditorWithAssociatedResourceOptions extends INewUntitledTextEditorOptions {
3222
+ /**
3223
+ * Resource components to associate with the untitled editor. When saving
3224
+ * the untitled editor, the associated components will be used and the user
3225
+ * is not being asked to provide a file path.
3226
+ *
3227
+ * Note: currently it is not possible to specify the `scheme` to use. The
3228
+ * untitled editor will saved to the default local or remote resource.
3229
+ */
3230
+ associatedResource?: {
3231
+ authority: string;
3232
+ path: string;
3233
+ query: string;
3234
+ fragment: string;
3235
+ };
3236
+ }
3237
+ interface IUntitledTextEditorModelManager {
3238
+ /**
3239
+ * Events for when untitled text editors change (e.g. getting dirty, saved or reverted).
3240
+ */
3241
+ readonly onDidChangeDirty: Event<IUntitledTextEditorModel>;
3242
+ /**
3243
+ * Events for when untitled text editor encodings change.
3244
+ */
3245
+ readonly onDidChangeEncoding: Event<IUntitledTextEditorModel>;
3246
+ /**
3247
+ * Events for when untitled text editor labels change.
3248
+ */
3249
+ readonly onDidChangeLabel: Event<IUntitledTextEditorModel>;
3250
+ /**
3251
+ * Events for when untitled text editors are about to be disposed.
3252
+ */
3253
+ readonly onWillDispose: Event<IUntitledTextEditorModel>;
3254
+ /**
3255
+ * Creates a new untitled editor model with the provided options. If the `untitledResource`
3256
+ * property is provided and the untitled editor exists, it will return that existing
3257
+ * instance instead of creating a new one.
3258
+ */
3259
+ create(options?: INewUntitledTextEditorOptions): IUntitledTextEditorModel;
3260
+ create(options?: INewUntitledTextEditorWithAssociatedResourceOptions): IUntitledTextEditorModel;
3261
+ create(options?: IExistingUntitledTextEditorOptions): IUntitledTextEditorModel;
3262
+ /**
3263
+ * Returns an existing untitled editor model if already created before.
3264
+ */
3265
+ get(resource: URI): IUntitledTextEditorModel | undefined;
3266
+ /**
3267
+ * Returns the value of the untitled editor, undefined if none exists
3268
+ * @param resource The URI of the untitled file
3269
+ * @returns The content, or undefined
3270
+ */
3271
+ getValue(resource: URI): string | undefined;
3272
+ /**
3273
+ * Resolves an untitled editor model from the provided options. If the `untitledResource`
3274
+ * property is provided and the untitled editor exists, it will return that existing
3275
+ * instance instead of creating a new one.
3276
+ */
3277
+ resolve(options?: INewUntitledTextEditorOptions): Promise<IUntitledTextEditorModel>;
3278
+ resolve(options?: INewUntitledTextEditorWithAssociatedResourceOptions): Promise<IUntitledTextEditorModel>;
3279
+ resolve(options?: IExistingUntitledTextEditorOptions): Promise<IUntitledTextEditorModel>;
3280
+ }
3281
+
3282
+ /**
3283
+ * A resource based `IWorkingCopy` is backed by a `URI` from a
3284
+ * known file system provider.
3285
+ */
3286
+ interface IResourceWorkingCopy extends IWorkingCopy, IDisposable {
3287
+ /**
3288
+ * An event for when the orphaned state of the resource working copy changes.
3289
+ */
3290
+ readonly onDidChangeOrphaned: Event<void>;
3291
+ /**
3292
+ * Whether the resource working copy is orphaned or not.
3293
+ */
3294
+ isOrphaned(): boolean;
3295
+ /**
3296
+ * An event for when the file working copy has been disposed.
3297
+ */
3298
+ readonly onWillDispose: Event<void>;
3299
+ /**
3300
+ * Whether the file working copy has been disposed or not.
3301
+ */
3302
+ isDisposed(): boolean;
3303
+ }
3304
+
3305
+ /**
3306
+ * A generic file working copy model to be reused by untitled
3307
+ * and stored file working copies.
3308
+ */
3309
+ interface IFileWorkingCopyModel extends IDisposable {
3310
+ /**
3311
+ * This event signals ANY changes to the contents, for example:
3312
+ * - through the user typing into the editor
3313
+ * - from API usage (e.g. bulk edits)
3314
+ * - when `IFileWorkingCopyModel#update` is invoked with contents
3315
+ * that are different from the current contents
3316
+ *
3317
+ * The file working copy will listen to these changes and may mark
3318
+ * the working copy as dirty whenever this event fires.
3319
+ *
3320
+ * Note: ONLY report changes to the model but not the underlying
3321
+ * file. The file working copy is tracking changes to the file
3322
+ * automatically.
3323
+ */
3324
+ readonly onDidChangeContent: Event<unknown>;
3325
+ /**
3326
+ * An event emitted right before disposing the model.
3327
+ */
3328
+ readonly onWillDispose: Event<void>;
3329
+ /**
3330
+ * Snapshots the model's current content for writing. This must include
3331
+ * any changes that were made to the model that are in memory.
3332
+ *
3333
+ * @param token support for cancellation
3334
+ */
3335
+ snapshot(token: CancellationToken): Promise<VSBufferReadableStream>;
3336
+ /**
3337
+ * Updates the model with the provided contents. The implementation should
3338
+ * behave in a similar fashion as `IFileWorkingCopyModelFactory#createModel`
3339
+ * except that here the model already exists and just needs to update to
3340
+ * the provided contents.
3341
+ *
3342
+ * Note: it is expected that the model fires a `onDidChangeContent` event
3343
+ * as part of the update.
3344
+ *
3345
+ * @param contents the contents to use for the model
3346
+ * @param token support for cancellation
3347
+ */
3348
+ update(contents: VSBufferReadableStream, token: CancellationToken): Promise<void>;
3349
+ }
3350
+ interface IFileWorkingCopy<M extends IFileWorkingCopyModel> extends IWorkingCopy, IDisposable {
3351
+ /**
3352
+ * An event for when the file working copy has been reverted.
3353
+ */
3354
+ readonly onDidRevert: Event<void>;
3355
+ /**
3356
+ * An event for when the file working copy has been disposed.
3357
+ */
3358
+ readonly onWillDispose: Event<void>;
3359
+ /**
3360
+ * Provides access to the underlying model of this file
3361
+ * based working copy. As long as the file working copy
3362
+ * has not been resolved, the model is `undefined`.
3363
+ */
3364
+ readonly model: M | undefined;
3365
+ /**
3366
+ * Resolves the file working copy and thus makes the `model`
3367
+ * available.
3368
+ */
3369
+ resolve(): Promise<void>;
3370
+ /**
3371
+ * Whether we have a resolved model or not.
3372
+ */
3373
+ isResolved(): this is IResolvedFileWorkingCopy<M>;
3374
+ }
3375
+ interface IResolvedFileWorkingCopy<M extends IFileWorkingCopyModel> extends IFileWorkingCopy<M> {
3376
+ /**
3377
+ * A resolved file working copy has a resolved model.
3378
+ */
3379
+ readonly model: M;
3380
+ }
3381
+
3382
+ /**
3383
+ * The underlying model of a stored file working copy provides some
3384
+ * methods for the stored file working copy to function. The model is
3385
+ * typically only available after the working copy has been
3386
+ * resolved via it's `resolve()` method.
3387
+ */
3388
+ interface IStoredFileWorkingCopyModel extends IFileWorkingCopyModel {
3389
+ readonly onDidChangeContent: Event<IStoredFileWorkingCopyModelContentChangedEvent>;
3390
+ /**
3391
+ * A version ID of the model. If a `onDidChangeContent` is fired
3392
+ * from the model and the last known saved `versionId` matches
3393
+ * with the `model.versionId`, the stored file working copy will
3394
+ * discard any dirty state.
3395
+ *
3396
+ * A use case is the following:
3397
+ * - a stored file working copy gets edited and thus dirty
3398
+ * - the user triggers undo to revert the changes
3399
+ * - at this point the `versionId` should match the one we had saved
3400
+ *
3401
+ * This requires the model to be aware of undo/redo operations.
3402
+ */
3403
+ readonly versionId: unknown;
3404
+ /**
3405
+ * Close the current undo-redo element. This offers a way
3406
+ * to create an undo/redo stop point.
3407
+ *
3408
+ * This method may for example be called right before the
3409
+ * save is triggered so that the user can always undo back
3410
+ * to the state before saving.
3411
+ */
3412
+ pushStackElement(): void;
3413
+ }
3414
+ interface IStoredFileWorkingCopyModelContentChangedEvent {
3415
+ /**
3416
+ * Flag that indicates that this event was generated while undoing.
3417
+ */
3418
+ readonly isUndoing: boolean;
3419
+ /**
3420
+ * Flag that indicates that this event was generated while redoing.
3421
+ */
3422
+ readonly isRedoing: boolean;
3423
+ }
3424
+ /**
3425
+ * A stored file based `IWorkingCopy` is backed by a `URI` from a
3426
+ * known file system provider. Given this assumption, a lot
3427
+ * of functionality can be built on top, such as saving in
3428
+ * a secure way to prevent data loss.
3429
+ */
3430
+ interface IStoredFileWorkingCopy<M extends IStoredFileWorkingCopyModel> extends IResourceWorkingCopy, IFileWorkingCopy<M> {
3431
+ /**
3432
+ * An event for when a stored file working copy was resolved.
3433
+ */
3434
+ readonly onDidResolve: Event<void>;
3435
+ /**
3436
+ * An event for when a stored file working copy was saved successfully.
3437
+ */
3438
+ readonly onDidSave: Event<IStoredFileWorkingCopySaveEvent>;
3439
+ /**
3440
+ * An event indicating that a stored file working copy save operation failed.
3441
+ */
3442
+ readonly onDidSaveError: Event<void>;
3443
+ /**
3444
+ * An event for when the readonly state of the stored file working copy changes.
3445
+ */
3446
+ readonly onDidChangeReadonly: Event<void>;
3447
+ /**
3448
+ * Resolves a stored file working copy.
3449
+ */
3450
+ resolve(options?: IStoredFileWorkingCopyResolveOptions): Promise<void>;
3451
+ /**
3452
+ * Explicitly sets the working copy to be dirty.
3453
+ */
3454
+ markDirty(): void;
3455
+ /**
3456
+ * Whether the stored file working copy is in the provided `state`
3457
+ * or not.
3458
+ *
3459
+ * @param state the `FileWorkingCopyState` to check on.
3460
+ */
3461
+ hasState(state: StoredFileWorkingCopyState): boolean;
3462
+ /**
3463
+ * Allows to join a state change away from the provided `state`.
3464
+ *
3465
+ * @param state currently only `FileWorkingCopyState.PENDING_SAVE`
3466
+ * can be awaited on to resolve.
3467
+ */
3468
+ joinState(state: StoredFileWorkingCopyState.PENDING_SAVE): Promise<void>;
3469
+ /**
3470
+ * Whether we have a resolved model or not.
3471
+ */
3472
+ isResolved(): this is IResolvedStoredFileWorkingCopy<M>;
3473
+ /**
3474
+ * Whether the stored file working copy is readonly or not.
3475
+ */
3476
+ isReadonly(): boolean;
3477
+ }
3478
+ interface IResolvedStoredFileWorkingCopy<M extends IStoredFileWorkingCopyModel> extends IStoredFileWorkingCopy<M> {
3479
+ /**
3480
+ * A resolved stored file working copy has a resolved model.
3481
+ */
3482
+ readonly model: M;
3483
+ }
3484
+ /**
3485
+ * States the stored file working copy can be in.
3486
+ */
3487
+ declare const enum StoredFileWorkingCopyState {
3488
+ /**
3489
+ * A stored file working copy is saved.
3490
+ */
3491
+ SAVED = 0,
3492
+ /**
3493
+ * A stored file working copy is dirty.
3494
+ */
3495
+ DIRTY = 1,
3496
+ /**
3497
+ * A stored file working copy is currently being saved but
3498
+ * this operation has not completed yet.
3499
+ */
3500
+ PENDING_SAVE = 2,
3501
+ /**
3502
+ * A stored file working copy is in conflict mode when changes
3503
+ * cannot be saved because the underlying file has changed.
3504
+ * Stored file working copies in conflict mode are always dirty.
3505
+ */
3506
+ CONFLICT = 3,
3507
+ /**
3508
+ * A stored file working copy is in orphan state when the underlying
3509
+ * file has been deleted.
3510
+ */
3511
+ ORPHAN = 4,
3512
+ /**
3513
+ * Any error that happens during a save that is not causing
3514
+ * the `StoredFileWorkingCopyState.CONFLICT` state.
3515
+ * Stored file working copies in error mode are always dirty.
3516
+ */
3517
+ ERROR = 5
3518
+ }
3519
+ interface IStoredFileWorkingCopyResolveOptions {
3520
+ /**
3521
+ * The contents to use for the stored file working copy if known. If not
3522
+ * provided, the contents will be retrieved from the underlying
3523
+ * resource or backup if present.
3524
+ *
3525
+ * If contents are provided, the stored file working copy will be marked
3526
+ * as dirty right from the beginning.
3527
+ */
3528
+ readonly contents?: VSBufferReadableStream;
3529
+ /**
3530
+ * Go to disk bypassing any cache of the stored file working copy if any.
3531
+ */
3532
+ readonly forceReadFromFile?: boolean;
3533
+ }
3534
+ interface IStoredFileWorkingCopySaveEvent extends IWorkingCopySaveEvent {
3535
+ /**
3536
+ * The resolved stat from the save operation.
3537
+ */
3538
+ readonly stat: IFileStatWithMetadata;
3539
+ }
3540
+
3541
+ interface SourceTargetPair {
3542
+ /**
3543
+ * The source resource that is defined for move operations.
3544
+ */
3545
+ readonly source?: URI;
3546
+ /**
3547
+ * The target resource the event is about.
3548
+ */
3549
+ readonly target: URI;
3550
+ }
3551
+ interface IFileOperationUndoRedoInfo {
3552
+ /**
3553
+ * Id of the undo group that the file operation belongs to.
3554
+ */
3555
+ undoRedoGroupId?: number;
3556
+ /**
3557
+ * Flag indicates if the operation is an undo.
3558
+ */
3559
+ isUndoing?: boolean;
3560
+ }
3561
+ interface WorkingCopyFileEvent extends IWaitUntil {
3562
+ /**
3563
+ * An identifier to correlate the operation through the
3564
+ * different event types (before, after, error).
3565
+ */
3566
+ readonly correlationId: number;
3567
+ /**
3568
+ * The file operation that is taking place.
3569
+ */
3570
+ readonly operation: FileOperation;
3571
+ /**
3572
+ * The array of source/target pair of files involved in given operation.
3573
+ */
3574
+ readonly files: readonly SourceTargetPair[];
3575
+ }
3576
+ interface IWorkingCopyFileOperationParticipant {
3577
+ /**
3578
+ * Participate in a file operation of working copies. Allows to
3579
+ * change the working copies before they are being saved to disk.
3580
+ */
3581
+ participate(files: SourceTargetPair[], operation: FileOperation, undoInfo: IFileOperationUndoRedoInfo | undefined, timeout: number, token: CancellationToken): Promise<void>;
3582
+ }
3583
+ interface IStoredFileWorkingCopySaveParticipant {
3584
+ /**
3585
+ * Participate in a save operation of file stored working copies.
3586
+ * Allows to make changes before content is being saved to disk.
3587
+ */
3588
+ participate(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: {
3589
+ reason: SaveReason;
3590
+ }, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
3591
+ }
3592
+ interface ICreateOperation {
3593
+ resource: URI;
3594
+ overwrite?: boolean;
3595
+ }
3596
+ interface ICreateFileOperation extends ICreateOperation {
3597
+ contents?: VSBuffer | VSBufferReadable | VSBufferReadableStream;
3598
+ }
3599
+ interface IDeleteOperation {
3600
+ resource: URI;
3601
+ useTrash?: boolean;
3602
+ recursive?: boolean;
3603
+ }
3604
+ interface IMoveOperation {
3605
+ file: Required<SourceTargetPair>;
3606
+ overwrite?: boolean;
3607
+ }
3608
+ interface ICopyOperation extends IMoveOperation {
3609
+ }
3610
+ /**
3611
+ * Returns the working copies for a given resource.
3612
+ */
3613
+ type WorkingCopyProvider = (resourceOrFolder: URI) => IWorkingCopy[];
3614
+
3615
+ declare const IWorkingCopyFileService: ServiceIdentifier<IWorkingCopyFileService>;
3616
+ /**
3617
+ * A service that allows to perform file operations with working copy support.
3618
+ * Any operation that would leave a stale dirty working copy behind will make
3619
+ * sure to revert the working copy first.
3620
+ *
3621
+ * On top of that events are provided to participate in each state of the
3622
+ * operation to perform additional work.
3623
+ */
3624
+ interface IWorkingCopyFileService {
3625
+ readonly _serviceBrand: undefined;
3626
+ /**
3627
+ * An event that is fired when a certain working copy IO operation is about to run.
3628
+ *
3629
+ * Participants can join this event with a long running operation to keep some state
3630
+ * before the operation is started, but working copies should not be changed at this
3631
+ * point in time. For that purpose, use the `IWorkingCopyFileOperationParticipant` API.
3632
+ */
3633
+ readonly onWillRunWorkingCopyFileOperation: Event<WorkingCopyFileEvent>;
3634
+ /**
3635
+ * An event that is fired after a working copy IO operation has failed.
3636
+ *
3637
+ * Participants can join this event with a long running operation to clean up as needed.
3638
+ */
3639
+ readonly onDidFailWorkingCopyFileOperation: Event<WorkingCopyFileEvent>;
3640
+ /**
3641
+ * An event that is fired after a working copy IO operation has been performed.
3642
+ *
3643
+ * Participants can join this event with a long running operation to make changes
3644
+ * after the operation has finished.
3645
+ */
3646
+ readonly onDidRunWorkingCopyFileOperation: Event<WorkingCopyFileEvent>;
3647
+ /**
3648
+ * Adds a participant for file operations on working copies.
3649
+ */
3650
+ addFileOperationParticipant(participant: IWorkingCopyFileOperationParticipant): IDisposable;
3651
+ /**
3652
+ * Whether save participants are present for stored file working copies.
3653
+ */
3654
+ get hasSaveParticipants(): boolean;
3655
+ /**
3656
+ * Adds a participant for save operations on stored file working copies.
3657
+ */
3658
+ addSaveParticipant(participant: IStoredFileWorkingCopySaveParticipant): IDisposable;
3659
+ /**
3660
+ * Runs all available save participants for stored file working copies.
3661
+ */
3662
+ runSaveParticipants(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: {
3663
+ reason: SaveReason;
3664
+ }, token: CancellationToken): Promise<void>;
3665
+ /**
3666
+ * Will create a resource with the provided optional contents, optionally overwriting any target.
3667
+ *
3668
+ * Working copy owners can listen to the `onWillRunWorkingCopyFileOperation` and
3669
+ * `onDidRunWorkingCopyFileOperation` events to participate.
3670
+ */
3671
+ create(operations: ICreateFileOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<readonly IFileStatWithMetadata[]>;
3672
+ /**
3673
+ * Will create a folder and any parent folder that needs to be created.
3674
+ *
3675
+ * Working copy owners can listen to the `onWillRunWorkingCopyFileOperation` and
3676
+ * `onDidRunWorkingCopyFileOperation` events to participate.
3677
+ *
3678
+ * Note: events will only be emitted for the provided resource, but not any
3679
+ * parent folders that are being created as part of the operation.
3680
+ */
3681
+ createFolder(operations: ICreateOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<readonly IFileStatWithMetadata[]>;
3682
+ /**
3683
+ * Will move working copies matching the provided resources and corresponding children
3684
+ * to the target resources using the associated file service for those resources.
3685
+ *
3686
+ * Working copy owners can listen to the `onWillRunWorkingCopyFileOperation` and
3687
+ * `onDidRunWorkingCopyFileOperation` events to participate.
3688
+ */
3689
+ move(operations: IMoveOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<readonly IFileStatWithMetadata[]>;
3690
+ /**
3691
+ * Will copy working copies matching the provided resources and corresponding children
3692
+ * to the target resources using the associated file service for those resources.
3693
+ *
3694
+ * Working copy owners can listen to the `onWillRunWorkingCopyFileOperation` and
3695
+ * `onDidRunWorkingCopyFileOperation` events to participate.
3696
+ */
3697
+ copy(operations: ICopyOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<readonly IFileStatWithMetadata[]>;
3698
+ /**
3699
+ * Will delete working copies matching the provided resources and children
3700
+ * using the associated file service for those resources.
3701
+ *
3702
+ * Working copy owners can listen to the `onWillRunWorkingCopyFileOperation` and
3703
+ * `onDidRunWorkingCopyFileOperation` events to participate.
3704
+ */
3705
+ delete(operations: IDeleteOperation[], token: CancellationToken, undoInfo?: IFileOperationUndoRedoInfo): Promise<void>;
3706
+ /**
3707
+ * Register a new provider for working copies based on a resource.
3708
+ *
3709
+ * @return a disposable that unregisters the provider.
3710
+ */
3711
+ registerWorkingCopyProvider(provider: WorkingCopyProvider): IDisposable;
3712
+ /**
3713
+ * Will return all working copies that are dirty matching the provided resource.
3714
+ * If the resource is a folder and the scheme supports file operations, a working
3715
+ * copy that is dirty and is a child of that folder will also be returned.
3716
+ */
3717
+ getDirty(resource: URI): readonly IWorkingCopy[];
3718
+ }
3719
+
3720
+ declare const ITextFileService: ServiceIdentifier<ITextFileService>;
3721
+ interface ITextFileService extends IDisposable {
3722
+ readonly _serviceBrand: undefined;
3723
+ /**
3724
+ * Access to the manager of text file editor models providing further
3725
+ * methods to work with them.
3726
+ */
3727
+ readonly files: ITextFileEditorModelManager;
3728
+ /**
3729
+ * Access to the manager of untitled text editor models providing further
3730
+ * methods to work with them.
3731
+ */
3732
+ readonly untitled: IUntitledTextEditorModelManager;
3733
+ /**
3734
+ * Helper to determine encoding for resources.
3735
+ */
3736
+ readonly encoding: IResourceEncodings;
3737
+ /**
3738
+ * A resource is dirty if it has unsaved changes or is an untitled file not yet saved.
3739
+ *
3740
+ * @param resource the resource to check for being dirty
3741
+ */
3742
+ isDirty(resource: URI): boolean;
3743
+ /**
3744
+ * Saves the resource.
3745
+ *
3746
+ * @param resource the resource to save
3747
+ * @param options optional save options
3748
+ * @return Path of the saved resource or undefined if canceled.
3749
+ */
3750
+ save(resource: URI, options?: ITextFileSaveOptions): Promise<URI | undefined>;
3751
+ /**
3752
+ * Saves the provided resource asking the user for a file name or using the provided one.
3753
+ *
3754
+ * @param resource the resource to save as.
3755
+ * @param targetResource the optional target to save to.
3756
+ * @param options optional save options
3757
+ * @return Path of the saved resource or undefined if canceled.
3758
+ */
3759
+ saveAs(resource: URI, targetResource?: URI, options?: ITextFileSaveAsOptions): Promise<URI | undefined>;
3760
+ /**
3761
+ * Reverts the provided resource.
3762
+ *
3763
+ * @param resource the resource of the file to revert.
3764
+ * @param force to force revert even when the file is not dirty
3765
+ */
3766
+ revert(resource: URI, options?: IRevertOptions): Promise<void>;
3767
+ /**
3768
+ * Read the contents of a file identified by the resource.
3769
+ */
3770
+ read(resource: URI, options?: IReadTextFileOptions): Promise<ITextFileContent>;
3771
+ /**
3772
+ * Read the contents of a file identified by the resource as stream.
3773
+ */
3774
+ readStream(resource: URI, options?: IReadTextFileOptions): Promise<ITextFileStreamContent>;
3775
+ /**
3776
+ * Update a file with given contents.
3777
+ */
3778
+ write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise<IFileStatWithMetadata>;
3779
+ /**
3780
+ * Create files. If the file exists it will be overwritten with the contents if
3781
+ * the options enable to overwrite.
3782
+ */
3783
+ create(operations: {
3784
+ resource: URI;
3785
+ value?: string | ITextSnapshot;
3786
+ options?: {
3787
+ overwrite?: boolean;
3788
+ };
3789
+ }[], undoInfo?: IFileOperationUndoRedoInfo): Promise<readonly IFileStatWithMetadata[]>;
3790
+ /**
3791
+ * Returns the readable that uses the appropriate encoding. This method should
3792
+ * be used whenever a `string` or `ITextSnapshot` is being persisted to the
3793
+ * file system.
3794
+ */
3795
+ getEncodedReadable(resource: URI, value: ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBufferReadable>;
3796
+ getEncodedReadable(resource: URI, value: string, options?: IWriteTextFileOptions): Promise<VSBuffer>;
3797
+ getEncodedReadable(resource: URI, value?: ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBufferReadable | undefined>;
3798
+ getEncodedReadable(resource: URI, value?: string, options?: IWriteTextFileOptions): Promise<VSBuffer | undefined>;
3799
+ getEncodedReadable(resource: URI, value?: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBuffer | VSBufferReadable | undefined>;
3800
+ /**
3801
+ * Returns a stream of strings that uses the appropriate encoding. This method should
3802
+ * be used whenever a `VSBufferReadableStream` is being loaded from the file system.
3803
+ *
3804
+ * Will throw an error if `acceptTextOnly: true` for resources that seem to be binary.
3805
+ */
3806
+ getDecodedStream(resource: URI, value: VSBufferReadableStream, options?: IReadTextFileEncodingOptions): Promise<ReadableStream<string>>;
3807
+ }
3808
+ interface IReadTextFileEncodingOptions {
3809
+ /**
3810
+ * The optional encoding parameter allows to specify the desired encoding when resolving
3811
+ * the contents of the file.
3812
+ */
3813
+ readonly encoding?: string;
3814
+ /**
3815
+ * The optional guessEncoding parameter allows to guess encoding from content of the file.
3816
+ */
3817
+ readonly autoGuessEncoding?: boolean;
3818
+ /**
3819
+ * The optional acceptTextOnly parameter allows to fail this request early if the file
3820
+ * contents are not textual.
3821
+ */
3822
+ readonly acceptTextOnly?: boolean;
3823
+ }
3824
+ interface IReadTextFileOptions extends IReadTextFileEncodingOptions, IReadFileStreamOptions {
3825
+ }
3826
+ interface IWriteTextFileOptions extends IWriteFileOptions {
3827
+ /**
3828
+ * The encoding to use when updating a file.
3829
+ */
3830
+ readonly encoding?: string;
3831
+ /**
3832
+ * Whether to write to the file as elevated (admin) user. When setting this option a prompt will
3833
+ * ask the user to authenticate as super user.
3834
+ */
3835
+ readonly writeElevated?: boolean;
3836
+ }
3837
+ interface IResourceEncodings {
3838
+ getPreferredReadEncoding(resource: URI): Promise<IResourceEncoding>;
3839
+ getPreferredWriteEncoding(resource: URI, preferredEncoding?: string): Promise<IResourceEncoding>;
3840
+ }
3841
+ interface IResourceEncoding {
3842
+ readonly encoding: string;
3843
+ readonly hasBOM: boolean;
3844
+ }
3845
+ /**
3846
+ * The save error handler can be installed on the text file editor model to install code that executes when save errors occur.
3847
+ */
3848
+ interface ISaveErrorHandler {
3849
+ /**
3850
+ * Called whenever a save fails.
3851
+ */
3852
+ onSaveError(error: Error, model: ITextFileEditorModel): void;
3853
+ }
3854
+ /**
3855
+ * States the text file editor model can be in.
3856
+ */
3857
+ declare const enum TextFileEditorModelState {
3858
+ /**
3859
+ * A model is saved.
3860
+ */
3861
+ SAVED = 0,
3862
+ /**
3863
+ * A model is dirty.
3864
+ */
3865
+ DIRTY = 1,
3866
+ /**
3867
+ * A model is currently being saved but this operation has not completed yet.
3868
+ */
3869
+ PENDING_SAVE = 2,
3870
+ /**
3871
+ * A model is in conflict mode when changes cannot be saved because the
3872
+ * underlying file has changed. Models in conflict mode are always dirty.
3873
+ */
3874
+ CONFLICT = 3,
3875
+ /**
3876
+ * A model is in orphan state when the underlying file has been deleted.
3877
+ */
3878
+ ORPHAN = 4,
3879
+ /**
3880
+ * Any error that happens during a save that is not causing the CONFLICT state.
3881
+ * Models in error mode are always dirty.
3882
+ */
3883
+ ERROR = 5
3884
+ }
3885
+ declare const enum TextFileResolveReason {
3886
+ EDITOR = 1,
3887
+ REFERENCE = 2,
3888
+ OTHER = 3
3889
+ }
3890
+ interface IBaseTextFileContent extends IBaseFileStatWithMetadata {
3891
+ /**
3892
+ * The encoding of the content if known.
3893
+ */
3894
+ readonly encoding: string;
3895
+ }
3896
+ interface ITextFileContent extends IBaseTextFileContent {
3897
+ /**
3898
+ * The content of a text file.
3899
+ */
3900
+ readonly value: string;
3901
+ }
3902
+ interface ITextFileStreamContent extends IBaseTextFileContent {
3903
+ /**
3904
+ * The line grouped content of a text file.
3905
+ */
3906
+ readonly value: ITextBufferFactory;
3907
+ }
3908
+ interface ITextFileEditorModelResolveOrCreateOptions extends ITextFileResolveOptions {
3909
+ /**
3910
+ * The language id to use for the model text content.
3911
+ */
3912
+ readonly languageId?: string;
3913
+ /**
3914
+ * The encoding to use when resolving the model text content.
3915
+ */
3916
+ readonly encoding?: string;
3917
+ /**
3918
+ * If the model was already resolved before, allows to trigger
3919
+ * a reload of it to fetch the latest contents.
3920
+ */
3921
+ readonly reload?: {
3922
+ /**
3923
+ * Controls whether the reload happens in the background
3924
+ * or whether `resolve` will await the reload to happen.
3925
+ */
3926
+ readonly async: boolean;
3927
+ };
3928
+ }
3929
+ interface ITextFileSaveEvent extends ITextFileEditorModelSaveEvent {
3930
+ /**
3931
+ * The model that was saved.
3932
+ */
3933
+ readonly model: ITextFileEditorModel;
3934
+ }
3935
+ interface ITextFileResolveEvent {
3936
+ /**
3937
+ * The model that was resolved.
3938
+ */
3939
+ readonly model: ITextFileEditorModel;
3940
+ /**
3941
+ * The reason why the model was resolved.
3942
+ */
3943
+ readonly reason: TextFileResolveReason;
3944
+ }
3945
+ interface ITextFileSaveParticipant {
3946
+ /**
3947
+ * Participate in a save of a model. Allows to change the model
3948
+ * before it is being saved to disk.
3949
+ */
3950
+ participate(model: ITextFileEditorModel, context: {
3951
+ reason: SaveReason;
3952
+ }, progress: IProgress<IProgressStep>, token: CancellationToken): Promise<void>;
3953
+ }
3954
+ interface ITextFileEditorModelManager {
3955
+ readonly onDidCreate: Event<ITextFileEditorModel>;
3956
+ readonly onDidResolve: Event<ITextFileResolveEvent>;
3957
+ readonly onDidChangeDirty: Event<ITextFileEditorModel>;
3958
+ readonly onDidChangeReadonly: Event<ITextFileEditorModel>;
3959
+ readonly onDidRemove: Event<URI>;
3960
+ readonly onDidChangeOrphaned: Event<ITextFileEditorModel>;
3961
+ readonly onDidChangeEncoding: Event<ITextFileEditorModel>;
3962
+ readonly onDidSaveError: Event<ITextFileEditorModel>;
3963
+ readonly onDidSave: Event<ITextFileSaveEvent>;
3964
+ readonly onDidRevert: Event<ITextFileEditorModel>;
3965
+ /**
3966
+ * Access to all text file editor models in memory.
3967
+ */
3968
+ readonly models: ITextFileEditorModel[];
3969
+ /**
3970
+ * Allows to configure the error handler that is called on save errors.
3971
+ */
3972
+ saveErrorHandler: ISaveErrorHandler;
3973
+ /**
3974
+ * Returns the text file editor model for the provided resource
3975
+ * or undefined if none.
3976
+ */
3977
+ get(resource: URI): ITextFileEditorModel | undefined;
3978
+ /**
3979
+ * Allows to resolve a text file model from disk.
3980
+ */
3981
+ resolve(resource: URI, options?: ITextFileEditorModelResolveOrCreateOptions): Promise<ITextFileEditorModel>;
3982
+ /**
3983
+ * Adds a participant for saving text file models.
3984
+ */
3985
+ addSaveParticipant(participant: ITextFileSaveParticipant): IDisposable;
3986
+ /**
3987
+ * Runs the registered save participants on the provided model.
3988
+ */
3989
+ runSaveParticipants(model: ITextFileEditorModel, context: {
3990
+ reason: SaveReason;
3991
+ }, token: CancellationToken): Promise<void>;
3992
+ /**
3993
+ * Waits for the model to be ready to be disposed. There may be conditions
3994
+ * under which the model cannot be disposed, e.g. when it is dirty. Once the
3995
+ * promise is settled, it is safe to dispose the model.
3996
+ */
3997
+ canDispose(model: ITextFileEditorModel): true | Promise<true>;
3998
+ }
3999
+ interface ITextFileSaveOptions extends ISaveOptions {
4000
+ /**
4001
+ * Save the file with an attempt to unlock it.
4002
+ */
4003
+ readonly writeUnlock?: boolean;
4004
+ /**
4005
+ * Save the file with elevated privileges.
4006
+ *
4007
+ * Note: This may not be supported in all environments.
4008
+ */
4009
+ readonly writeElevated?: boolean;
4010
+ /**
4011
+ * Allows to write to a file even if it has been modified on disk.
4012
+ */
4013
+ readonly ignoreModifiedSince?: boolean;
4014
+ /**
4015
+ * If set, will bubble up the error to the caller instead of handling it.
4016
+ */
4017
+ readonly ignoreErrorHandler?: boolean;
4018
+ }
4019
+ interface ITextFileSaveAsOptions extends ITextFileSaveOptions {
4020
+ /**
4021
+ * Optional URI to use as suggested file path to save as.
4022
+ */
4023
+ readonly suggestedTarget?: URI;
4024
+ }
4025
+ interface ITextFileResolveOptions {
4026
+ /**
4027
+ * The contents to use for the model if known. If not
4028
+ * provided, the contents will be retrieved from the
4029
+ * underlying resource or backup if present.
4030
+ */
4031
+ readonly contents?: ITextBufferFactory;
4032
+ /**
4033
+ * Go to file bypassing any cache of the model if any.
4034
+ */
4035
+ readonly forceReadFromFile?: boolean;
4036
+ /**
4037
+ * Allow to resolve a model even if we think it is a binary file.
4038
+ */
4039
+ readonly allowBinary?: boolean;
4040
+ /**
4041
+ * Context why the model is being resolved.
4042
+ */
4043
+ readonly reason?: TextFileResolveReason;
4044
+ /**
4045
+ * If provided, the size of the file will be checked against the limits
4046
+ * and an error will be thrown if any limit is exceeded.
4047
+ */
4048
+ readonly limits?: IFileReadLimits;
4049
+ }
4050
+ declare const enum EncodingMode {
4051
+ /**
4052
+ * Instructs the encoding support to encode the object with the provided encoding
4053
+ */
4054
+ Encode = 0,
4055
+ /**
4056
+ * Instructs the encoding support to decode the object with the provided encoding
4057
+ */
4058
+ Decode = 1
4059
+ }
4060
+ interface IEncodingSupport {
4061
+ /**
4062
+ * Gets the encoding of the object if known.
4063
+ */
4064
+ getEncoding(): string | undefined;
4065
+ /**
4066
+ * Sets the encoding for the object for saving.
4067
+ */
4068
+ setEncoding(encoding: string, mode: EncodingMode): Promise<void>;
4069
+ }
4070
+ interface ILanguageSupport {
4071
+ /**
4072
+ * Sets the language id of the object.
4073
+ */
4074
+ setLanguageId(languageId: string, source?: string): void;
4075
+ }
4076
+ interface ITextFileEditorModelSaveEvent extends IWorkingCopySaveEvent {
4077
+ /**
4078
+ * The resolved stat from the save operation.
4079
+ */
4080
+ readonly stat: IFileStatWithMetadata;
4081
+ }
4082
+ interface ITextFileEditorModel extends ITextEditorModel, IEncodingSupport, ILanguageSupport, IWorkingCopy {
4083
+ readonly onDidSave: Event<ITextFileEditorModelSaveEvent>;
4084
+ readonly onDidSaveError: Event<void>;
4085
+ readonly onDidChangeOrphaned: Event<void>;
4086
+ readonly onDidChangeReadonly: Event<void>;
4087
+ readonly onDidChangeEncoding: Event<void>;
4088
+ hasState(state: TextFileEditorModelState): boolean;
4089
+ joinState(state: TextFileEditorModelState.PENDING_SAVE): Promise<void>;
4090
+ updatePreferredEncoding(encoding: string | undefined): void;
4091
+ save(options?: ITextFileSaveOptions): Promise<boolean>;
4092
+ revert(options?: IRevertOptions): Promise<void>;
4093
+ resolve(options?: ITextFileResolveOptions): Promise<void>;
4094
+ isDirty(): this is IResolvedTextFileEditorModel;
4095
+ getLanguageId(): string | undefined;
4096
+ isResolved(): this is IResolvedTextFileEditorModel;
4097
+ }
4098
+ interface IResolvedTextFileEditorModel extends ITextFileEditorModel {
4099
+ readonly textEditorModel: ITextModel;
4100
+ createSnapshot(): ITextSnapshot;
4101
+ }
4102
+
4103
+ interface IEditorDescriptor<T extends IEditorPane> {
4104
+ /**
4105
+ * The unique type identifier of the editor. All instances
4106
+ * of the same `IEditorPane` should have the same type
4107
+ * identifier.
4108
+ */
4109
+ readonly typeId: string;
4110
+ /**
4111
+ * The display name of the editor.
4112
+ */
4113
+ readonly name: string;
4114
+ /**
4115
+ * Instantiates the editor pane using the provided services.
4116
+ */
4117
+ instantiate(instantiationService: IInstantiationService): T;
4118
+ /**
4119
+ * Whether the descriptor is for the provided editor pane.
4120
+ */
4121
+ describes(editorPane: T): boolean;
4122
+ }
4123
+ /**
4124
+ * The editor pane is the container for workbench editors.
4125
+ */
4126
+ interface IEditorPane extends IComposite {
4127
+ /**
4128
+ * An event to notify when the `IEditorControl` in this
4129
+ * editor pane changes.
4130
+ *
4131
+ * This can be used for editor panes that are a compound
4132
+ * of multiple editor controls to signal that the active
4133
+ * editor control has changed when the user clicks around.
4134
+ */
4135
+ readonly onDidChangeControl: Event<void>;
4136
+ /**
4137
+ * An optional event to notify when the selection inside the editor
4138
+ * pane changed in case the editor has a selection concept.
4139
+ *
4140
+ * For example, in a text editor pane, the selection changes whenever
4141
+ * the cursor is set to a new location.
4142
+ */
4143
+ readonly onDidChangeSelection?: Event<IEditorPaneSelectionChangeEvent>;
4144
+ /**
4145
+ * The assigned input of this editor.
4146
+ */
4147
+ readonly input: EditorInput | undefined;
4148
+ /**
4149
+ * The assigned options of the editor.
4150
+ */
4151
+ readonly options: IEditorOptions | undefined;
4152
+ /**
4153
+ * The assigned group this editor is showing in.
4154
+ */
4155
+ readonly group: IEditorGroup | undefined;
4156
+ /**
4157
+ * The minimum width of this editor.
4158
+ */
4159
+ readonly minimumWidth: number;
4160
+ /**
4161
+ * The maximum width of this editor.
4162
+ */
4163
+ readonly maximumWidth: number;
4164
+ /**
4165
+ * The minimum height of this editor.
4166
+ */
4167
+ readonly minimumHeight: number;
4168
+ /**
4169
+ * The maximum height of this editor.
4170
+ */
4171
+ readonly maximumHeight: number;
4172
+ /**
4173
+ * An event to notify whenever minimum/maximum width/height changes.
4174
+ */
4175
+ readonly onDidChangeSizeConstraints: Event<{
4176
+ width: number;
4177
+ height: number;
4178
+ } | undefined>;
4179
+ /**
4180
+ * The context key service for this editor. Should be overridden by
4181
+ * editors that have their own ScopedContextKeyService
4182
+ */
4183
+ readonly scopedContextKeyService: IContextKeyService | undefined;
4184
+ /**
4185
+ * Returns the underlying control of this editor. Callers need to cast
4186
+ * the control to a specific instance as needed, e.g. by using the
4187
+ * `isCodeEditor` helper method to access the text code editor.
4188
+ *
4189
+ * Use the `onDidChangeControl` event to track whenever the control
4190
+ * changes.
4191
+ */
4192
+ getControl(): IEditorControl | undefined;
4193
+ /**
4194
+ * Returns the current view state of the editor if any.
4195
+ *
4196
+ * This method is optional to override for the editor pane
4197
+ * and should only be overridden when the pane can deal with
4198
+ * `IEditorOptions.viewState` to be applied when opening.
4199
+ */
4200
+ getViewState(): object | undefined;
4201
+ /**
4202
+ * An optional method to return the current selection in
4203
+ * the editor pane in case the editor pane has a selection
4204
+ * concept.
4205
+ *
4206
+ * Clients of this method will typically react to the
4207
+ * `onDidChangeSelection` event to receive the current
4208
+ * selection as needed.
4209
+ */
4210
+ getSelection?(): IEditorPaneSelection | undefined;
4211
+ /**
4212
+ * Finds out if this editor is visible or not.
4213
+ */
4214
+ isVisible(): boolean;
4215
+ }
4216
+ interface IEditorPaneSelectionChangeEvent {
4217
+ /**
4218
+ * More details for how the selection was made.
4219
+ */
4220
+ reason: EditorPaneSelectionChangeReason;
4221
+ }
4222
+ declare const enum EditorPaneSelectionChangeReason {
4223
+ /**
4224
+ * The selection was changed as a result of a programmatic
4225
+ * method invocation.
4226
+ *
4227
+ * For a text editor pane, this for example can be a selection
4228
+ * being restored from previous view state automatically.
4229
+ */
4230
+ PROGRAMMATIC = 1,
4231
+ /**
4232
+ * The selection was changed by the user.
4233
+ *
4234
+ * This typically means the user changed the selection
4235
+ * with mouse or keyboard.
4236
+ */
4237
+ USER = 2,
4238
+ /**
4239
+ * The selection was changed as a result of editing in
4240
+ * the editor pane.
4241
+ *
4242
+ * For a text editor pane, this for example can be typing
4243
+ * in the text of the editor pane.
4244
+ */
4245
+ EDIT = 3,
4246
+ /**
4247
+ * The selection was changed as a result of a navigation
4248
+ * action.
4249
+ *
4250
+ * For a text editor pane, this for example can be a result
4251
+ * of selecting an entry from a text outline view.
4252
+ */
4253
+ NAVIGATION = 4,
4254
+ /**
4255
+ * The selection was changed as a result of a jump action
4256
+ * from within the editor pane.
4257
+ *
4258
+ * For a text editor pane, this for example can be a result
4259
+ * of invoking "Go to definition" from a symbol.
4260
+ */
4261
+ JUMP = 5
4262
+ }
4263
+ interface IEditorPaneSelection {
4264
+ /**
4265
+ * Asks to compare this selection to another selection.
4266
+ */
4267
+ compare(otherSelection: IEditorPaneSelection): EditorPaneSelectionCompareResult;
4268
+ /**
4269
+ * Asks to massage the provided `options` in a way
4270
+ * that the selection can be restored when the editor
4271
+ * is opened again.
4272
+ *
4273
+ * For a text editor this means to apply the selected
4274
+ * line and column as text editor options.
4275
+ */
4276
+ restore(options: IEditorOptions): IEditorOptions;
4277
+ /**
4278
+ * Only used for logging to print more info about the selection.
4279
+ */
4280
+ log?(): string;
4281
+ }
4282
+ declare const enum EditorPaneSelectionCompareResult {
4283
+ /**
4284
+ * The selections are identical.
4285
+ */
4286
+ IDENTICAL = 1,
4287
+ /**
4288
+ * The selections are similar.
4289
+ *
4290
+ * For a text editor this can mean that the one
4291
+ * selection is in close proximity to the other
4292
+ * selection.
4293
+ *
4294
+ * Upstream clients may decide in this case to
4295
+ * not treat the selection different from the
4296
+ * previous one because it is not distinct enough.
4297
+ */
4298
+ SIMILAR = 2,
4299
+ /**
4300
+ * The selections are entirely different.
4301
+ */
4302
+ DIFFERENT = 3
4303
+ }
4304
+ /**
4305
+ * Overrides `IEditorPane` where `input` and `group` are known to be set.
4306
+ */
4307
+ interface IVisibleEditorPane extends IEditorPane {
4308
+ readonly input: EditorInput;
4309
+ readonly group: IEditorGroup;
4310
+ }
4311
+ /**
4312
+ * The text editor pane is the container for workbench text diff editors.
4313
+ */
4314
+ interface ITextDiffEditorPane extends IEditorPane {
4315
+ /**
4316
+ * Returns the underlying text diff editor widget of this editor.
4317
+ */
4318
+ getControl(): IDiffEditor | undefined;
4319
+ }
4320
+ /**
4321
+ * Marker interface for the control inside an editor pane. Callers
4322
+ * have to cast the control to work with it, e.g. via methods
4323
+ * such as `isCodeEditor(control)`.
4324
+ */
4325
+ interface IEditorControl extends ICompositeControl {
4326
+ }
4327
+ interface IUntitledTextResourceEditorInput extends IBaseTextResourceEditorInput {
4328
+ /**
4329
+ * Optional resource for the untitled editor. Depending on the value, the editor:
4330
+ * - should get a unique name if `undefined` (for example `Untitled-1`)
4331
+ * - should use the resource directly if the scheme is `untitled:`
4332
+ * - should change the scheme to `untitled:` otherwise and assume an associated path
4333
+ *
4334
+ * Untitled editors with associated path behave slightly different from other untitled
4335
+ * editors:
4336
+ * - they are dirty right when opening
4337
+ * - they will not ask for a file path when saving but use the associated path
4338
+ */
4339
+ readonly resource: URI | undefined;
4340
+ }
4341
+ /**
4342
+ * A resource side by side editor input shows 2 editors side by side but
4343
+ * without highlighting any differences.
4344
+ *
4345
+ * Note: both sides will be resolved as editor individually. As such, it is
4346
+ * possible to show 2 different editors side by side.
4347
+ *
4348
+ * @see {@link IResourceDiffEditorInput} for a variant that compares 2 editors.
4349
+ */
4350
+ interface IResourceSideBySideEditorInput extends IBaseUntypedEditorInput {
4351
+ /**
4352
+ * The right hand side editor to open inside a side-by-side editor.
4353
+ */
4354
+ readonly primary: IResourceEditorInput | ITextResourceEditorInput | IUntitledTextResourceEditorInput;
4355
+ /**
4356
+ * The left hand side editor to open inside a side-by-side editor.
4357
+ */
4358
+ readonly secondary: IResourceEditorInput | ITextResourceEditorInput | IUntitledTextResourceEditorInput;
4359
+ }
4360
+ /**
4361
+ * A resource diff editor input compares 2 editors side by side
4362
+ * highlighting the differences.
4363
+ *
4364
+ * Note: both sides must be resolvable to the same editor, or
4365
+ * a text based presentation will be used as fallback.
4366
+ */
4367
+ interface IResourceDiffEditorInput extends IBaseUntypedEditorInput {
4368
+ /**
4369
+ * The left hand side editor to open inside a diff editor.
4370
+ */
4371
+ readonly original: IResourceEditorInput | ITextResourceEditorInput | IUntitledTextResourceEditorInput;
4372
+ /**
4373
+ * The right hand side editor to open inside a diff editor.
4374
+ */
4375
+ readonly modified: IResourceEditorInput | ITextResourceEditorInput | IUntitledTextResourceEditorInput;
4376
+ }
4377
+ type IResourceMergeEditorInputSide = (IResourceEditorInput | ITextResourceEditorInput) & {
4378
+ detail?: string;
4379
+ };
4380
+ /**
4381
+ * A resource merge editor input compares multiple editors
4382
+ * highlighting the differences for merging.
4383
+ *
4384
+ * Note: all sides must be resolvable to the same editor, or
4385
+ * a text based presentation will be used as fallback.
4386
+ */
4387
+ interface IResourceMergeEditorInput extends IBaseUntypedEditorInput {
4388
+ /**
4389
+ * The one changed version of the file.
4390
+ */
4391
+ readonly input1: IResourceMergeEditorInputSide;
4392
+ /**
4393
+ * The second changed version of the file.
4394
+ */
4395
+ readonly input2: IResourceMergeEditorInputSide;
4396
+ /**
4397
+ * The base common ancestor of the file to merge.
4398
+ */
4399
+ readonly base: IResourceEditorInput | ITextResourceEditorInput;
4400
+ /**
4401
+ * The resulting output of the merge.
4402
+ */
4403
+ readonly result: IResourceEditorInput | ITextResourceEditorInput;
4404
+ }
4405
+ declare const enum Verbosity {
4406
+ SHORT = 0,
4407
+ MEDIUM = 1,
4408
+ LONG = 2
4409
+ }
4410
+ declare const enum SaveReason {
4411
+ /**
4412
+ * Explicit user gesture.
4413
+ */
4414
+ EXPLICIT = 1,
4415
+ /**
4416
+ * Auto save after a timeout.
4417
+ */
4418
+ AUTO = 2,
4419
+ /**
4420
+ * Auto save after editor focus change.
4421
+ */
4422
+ FOCUS_CHANGE = 3,
4423
+ /**
4424
+ * Auto save after window change.
4425
+ */
4426
+ WINDOW_CHANGE = 4
4427
+ }
4428
+ type SaveSource = string;
4429
+ interface ISaveOptions {
4430
+ /**
4431
+ * An indicator how the save operation was triggered.
4432
+ */
4433
+ reason?: SaveReason;
4434
+ /**
4435
+ * An indicator about the source of the save operation.
4436
+ *
4437
+ * Must use `SaveSourceRegistry.registerSource()` to obtain.
4438
+ */
4439
+ readonly source?: SaveSource;
4440
+ /**
4441
+ * Forces to save the contents of the working copy
4442
+ * again even if the working copy is not dirty.
4443
+ */
4444
+ readonly force?: boolean;
4445
+ /**
4446
+ * Instructs the save operation to skip any save participants.
4447
+ */
4448
+ readonly skipSaveParticipants?: boolean;
4449
+ /**
4450
+ * A hint as to which file systems should be available for saving.
4451
+ */
4452
+ readonly availableFileSystems?: string[];
4453
+ }
4454
+ interface IRevertOptions {
4455
+ /**
4456
+ * Forces to load the contents of the working copy
4457
+ * again even if the working copy is not dirty.
4458
+ */
4459
+ readonly force?: boolean;
4460
+ /**
4461
+ * A soft revert will clear dirty state of a working copy
4462
+ * but will not attempt to load it from its persisted state.
4463
+ *
4464
+ * This option may be used in scenarios where an editor is
4465
+ * closed and where we do not require to load the contents.
4466
+ */
4467
+ readonly soft?: boolean;
4468
+ }
4469
+ interface IMoveResult {
4470
+ editor: EditorInput | IUntypedEditorInput;
4471
+ options?: IEditorOptions;
4472
+ }
4473
+ declare const enum EditorInputCapabilities {
4474
+ /**
4475
+ * Signals no specific capability for the input.
4476
+ */
4477
+ None = 0,
4478
+ /**
4479
+ * Signals that the input is readonly.
4480
+ */
4481
+ Readonly = 2,
4482
+ /**
4483
+ * Signals that the input is untitled.
4484
+ */
4485
+ Untitled = 4,
4486
+ /**
4487
+ * Signals that the input can only be shown in one group
4488
+ * and not be split into multiple groups.
4489
+ */
4490
+ Singleton = 8,
4491
+ /**
4492
+ * Signals that the input requires workspace trust.
4493
+ */
4494
+ RequiresTrust = 16,
4495
+ /**
4496
+ * Signals that the editor can split into 2 in the same
4497
+ * editor group.
4498
+ */
4499
+ CanSplitInGroup = 32,
4500
+ /**
4501
+ * Signals that the editor wants its description to be
4502
+ * visible when presented to the user. By default, a UI
4503
+ * component may decide to hide the description portion
4504
+ * for brevity.
4505
+ */
4506
+ ForceDescription = 64,
4507
+ /**
4508
+ * Signals that the editor supports dropping into the
4509
+ * editor by holding shift.
4510
+ */
4511
+ CanDropIntoEditor = 128,
4512
+ /**
4513
+ * Signals that the editor is composed of multiple editors
4514
+ * within.
4515
+ */
4516
+ MultipleEditors = 256
4517
+ }
4518
+ type IUntypedEditorInput = IResourceEditorInput | ITextResourceEditorInput | IUntitledTextResourceEditorInput | IResourceDiffEditorInput | IResourceSideBySideEditorInput | IResourceMergeEditorInput;
4519
+ declare abstract class AbstractEditorInput extends Disposable {
4520
+ }
4521
+ interface EditorInputWithOptions {
4522
+ editor: EditorInput;
4523
+ options?: IEditorOptions;
4524
+ }
4525
+ interface IEditorIdentifier {
4526
+ groupId: GroupIdentifier;
4527
+ editor: EditorInput;
4528
+ }
4529
+ /**
4530
+ * More information around why an editor was closed in the model.
4531
+ */
4532
+ declare enum EditorCloseContext {
4533
+ /**
4534
+ * No specific context for closing (e.g. explicit user gesture).
4535
+ */
4536
+ UNKNOWN = 0,
4537
+ /**
4538
+ * The editor closed because it was replaced with another editor.
4539
+ * This can either happen via explicit replace call or when an
4540
+ * editor is in preview mode and another editor opens.
4541
+ */
4542
+ REPLACE = 1,
4543
+ /**
4544
+ * The editor closed as a result of moving it to another group.
4545
+ */
4546
+ MOVE = 2,
4547
+ /**
4548
+ * The editor closed because another editor turned into preview
4549
+ * and this used to be the preview editor before.
4550
+ */
4551
+ UNPIN = 3
4552
+ }
4553
+ interface IEditorCloseEvent extends IEditorIdentifier {
4554
+ /**
4555
+ * More information around why the editor was closed.
4556
+ */
4557
+ readonly context: EditorCloseContext;
4558
+ /**
4559
+ * The index of the editor before closing.
4560
+ */
4561
+ readonly index: number;
4562
+ /**
4563
+ * Whether the editor was sticky or not.
4564
+ */
4565
+ readonly sticky: boolean;
4566
+ }
4567
+ interface IActiveEditorChangeEvent {
4568
+ /**
4569
+ * The new active editor or `undefined` if the group is empty.
4570
+ */
4571
+ editor: EditorInput | undefined;
4572
+ }
4573
+ interface IEditorWillMoveEvent extends IEditorIdentifier {
4574
+ /**
4575
+ * The target group of the move operation.
4576
+ */
4577
+ readonly target: GroupIdentifier;
4578
+ }
4579
+ interface IEditorWillOpenEvent extends IEditorIdentifier {
4580
+ }
4581
+ type GroupIdentifier = number;
4582
+ declare const enum GroupModelChangeKind {
4583
+ GROUP_ACTIVE = 0,
4584
+ GROUP_INDEX = 1,
4585
+ GROUP_LOCKED = 2,
4586
+ EDITOR_OPEN = 3,
4587
+ EDITOR_CLOSE = 4,
4588
+ EDITOR_MOVE = 5,
4589
+ EDITOR_ACTIVE = 6,
4590
+ EDITOR_LABEL = 7,
4591
+ EDITOR_CAPABILITIES = 8,
4592
+ EDITOR_PIN = 9,
4593
+ EDITOR_STICKY = 10,
4594
+ EDITOR_DIRTY = 11,
4595
+ EDITOR_WILL_DISPOSE = 12
4596
+ }
4597
+ interface IEditorPartConfiguration {
4598
+ showTabs?: boolean;
4599
+ wrapTabs?: boolean;
4600
+ scrollToSwitchTabs?: boolean;
4601
+ highlightModifiedTabs?: boolean;
4602
+ tabCloseButton?: 'left' | 'right' | 'off';
4603
+ tabSizing?: 'fit' | 'shrink';
4604
+ pinnedTabSizing?: 'normal' | 'compact' | 'shrink';
4605
+ titleScrollbarSizing?: 'default' | 'large';
4606
+ focusRecentEditorAfterClose?: boolean;
4607
+ showIcons?: boolean;
4608
+ enablePreview?: boolean;
4609
+ enablePreviewFromQuickOpen?: boolean;
4610
+ enablePreviewFromCodeNavigation?: boolean;
4611
+ closeOnFileDelete?: boolean;
4612
+ openPositioning?: 'left' | 'right' | 'first' | 'last';
4613
+ openSideBySideDirection?: 'right' | 'down';
4614
+ closeEmptyGroups?: boolean;
4615
+ autoLockGroups?: Set<string>;
4616
+ revealIfOpen?: boolean;
4617
+ mouseBackForwardToNavigate?: boolean;
4618
+ labelFormat?: 'default' | 'short' | 'medium' | 'long';
4619
+ restoreViewState?: boolean;
4620
+ splitInGroupLayout?: 'vertical' | 'horizontal';
4621
+ splitSizing?: 'split' | 'distribute';
4622
+ splitOnDragAndDrop?: boolean;
4623
+ centeredLayoutFixedWidth?: boolean;
4624
+ limit?: {
4625
+ enabled?: boolean;
4626
+ excludeDirty?: boolean;
4627
+ value?: number;
4628
+ perEditorGroup?: boolean;
4629
+ };
4630
+ decorations?: {
4631
+ badges?: boolean;
4632
+ colors?: boolean;
4633
+ };
4634
+ }
4635
+ interface IEditorPartOptions extends IEditorPartConfiguration {
4636
+ hasIcons?: boolean;
4637
+ }
4638
+ interface IEditorPartOptionsChangeEvent {
4639
+ oldPartOptions: IEditorPartOptions;
4640
+ newPartOptions: IEditorPartOptions;
4641
+ }
4642
+ declare enum SideBySideEditor {
4643
+ PRIMARY = 1,
4644
+ SECONDARY = 2,
4645
+ BOTH = 3,
4646
+ ANY = 4
4647
+ }
4648
+ interface IFindEditorOptions {
4649
+ /**
4650
+ * Whether to consider any or both side by side editor as matching.
4651
+ * By default, side by side editors will not be considered
4652
+ * as matching, even if the editor is opened in one of the sides.
4653
+ */
4654
+ supportSideBySide?: SideBySideEditor.PRIMARY | SideBySideEditor.SECONDARY | SideBySideEditor.ANY;
4655
+ }
4656
+ interface IMatchEditorOptions {
4657
+ /**
4658
+ * Whether to consider a side by side editor as matching.
4659
+ * By default, side by side editors will not be considered
4660
+ * as matching, even if the editor is opened in one of the sides.
4661
+ */
4662
+ supportSideBySide?: SideBySideEditor.ANY | SideBySideEditor.BOTH;
4663
+ /**
4664
+ * Only consider an editor to match when the
4665
+ * `candidate === editor` but not when
4666
+ * `candidate.matches(editor)`.
4667
+ */
4668
+ strictEquals?: boolean;
4669
+ }
4670
+ declare const enum CloseDirection {
4671
+ LEFT = 0,
4672
+ RIGHT = 1
4673
+ }
4674
+ declare const enum EditorsOrder {
4675
+ /**
4676
+ * Editors sorted by most recent activity (most recent active first)
4677
+ */
4678
+ MOST_RECENTLY_ACTIVE = 0,
4679
+ /**
4680
+ * Editors sorted by sequential order
4681
+ */
4682
+ SEQUENTIAL = 1
4683
+ }
4684
+
4685
+ interface LanguageFilter {
4686
+ readonly language?: string;
4687
+ readonly scheme?: string;
4688
+ readonly pattern?: string | IRelativePattern;
4689
+ readonly notebookType?: string;
4690
+ /**
4691
+ * This provider is implemented in the UI thread.
4692
+ */
4693
+ readonly hasAccessToAllModels?: boolean;
4694
+ readonly exclusive?: boolean;
4695
+ /**
4696
+ * This provider comes from a builtin extension.
4697
+ */
4698
+ readonly isBuiltin?: boolean;
4699
+ }
4700
+ type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
4701
+
4702
+ interface NotebookInfo {
4703
+ readonly uri: URI;
4704
+ readonly type: string;
4705
+ }
4706
+ interface NotebookInfoResolver {
4707
+ (uri: URI): NotebookInfo | undefined;
4708
+ }
4709
+ declare class LanguageFeatureRegistry<T> {
4710
+ private readonly _notebookInfoResolver?;
4711
+ private _clock;
4712
+ private readonly _entries;
4713
+ private readonly _onDidChange;
4714
+ readonly onDidChange: Event<number>;
4715
+ constructor(_notebookInfoResolver?: NotebookInfoResolver | undefined);
4716
+ register(selector: LanguageSelector, provider: T): IDisposable;
4717
+ has(model: ITextModel): boolean;
4718
+ all(model: ITextModel): T[];
4719
+ ordered(model: ITextModel): T[];
4720
+ orderedGroups(model: ITextModel): T[][];
4721
+ private _orderedForEach;
4722
+ private _lastCandidate;
4723
+ private _updateScores;
4724
+ private static _compareByScoreAndTime;
4725
+ }
4726
+
4727
+ declare const ILanguageFeaturesService: ServiceIdentifier<ILanguageFeaturesService>;
4728
+ interface ILanguageFeaturesService {
4729
+ readonly _serviceBrand: undefined;
4730
+ readonly referenceProvider: LanguageFeatureRegistry<ReferenceProvider>;
4731
+ readonly definitionProvider: LanguageFeatureRegistry<DefinitionProvider>;
4732
+ readonly typeDefinitionProvider: LanguageFeatureRegistry<TypeDefinitionProvider>;
4733
+ readonly declarationProvider: LanguageFeatureRegistry<DeclarationProvider>;
4734
+ readonly implementationProvider: LanguageFeatureRegistry<ImplementationProvider>;
4735
+ readonly codeActionProvider: LanguageFeatureRegistry<CodeActionProvider>;
4736
+ readonly documentPasteEditProvider: LanguageFeatureRegistry<DocumentPasteEditProvider>;
4737
+ readonly renameProvider: LanguageFeatureRegistry<RenameProvider>;
4738
+ readonly documentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>;
4739
+ readonly documentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>;
4740
+ readonly onTypeFormattingEditProvider: LanguageFeatureRegistry<OnTypeFormattingEditProvider>;
4741
+ readonly documentSymbolProvider: LanguageFeatureRegistry<DocumentSymbolProvider>;
4742
+ readonly inlayHintsProvider: LanguageFeatureRegistry<InlayHintsProvider>;
4743
+ readonly colorProvider: LanguageFeatureRegistry<DocumentColorProvider>;
4744
+ readonly codeLensProvider: LanguageFeatureRegistry<CodeLensProvider>;
4745
+ readonly signatureHelpProvider: LanguageFeatureRegistry<SignatureHelpProvider>;
4746
+ readonly hoverProvider: LanguageFeatureRegistry<HoverProvider>;
4747
+ readonly documentHighlightProvider: LanguageFeatureRegistry<DocumentHighlightProvider>;
4748
+ readonly documentRangeSemanticTokensProvider: LanguageFeatureRegistry<DocumentRangeSemanticTokensProvider>;
4749
+ readonly documentSemanticTokensProvider: LanguageFeatureRegistry<DocumentSemanticTokensProvider>;
4750
+ readonly selectionRangeProvider: LanguageFeatureRegistry<SelectionRangeProvider>;
4751
+ readonly foldingRangeProvider: LanguageFeatureRegistry<FoldingRangeProvider>;
4752
+ readonly linkProvider: LanguageFeatureRegistry<LinkProvider>;
4753
+ readonly inlineCompletionsProvider: LanguageFeatureRegistry<InlineCompletionsProvider>;
4754
+ readonly completionProvider: LanguageFeatureRegistry<CompletionItemProvider>;
4755
+ readonly linkedEditingRangeProvider: LanguageFeatureRegistry<LinkedEditingRangeProvider>;
4756
+ readonly inlineValuesProvider: LanguageFeatureRegistry<InlineValuesProvider>;
4757
+ readonly evaluatableExpressionProvider: LanguageFeatureRegistry<EvaluatableExpressionProvider>;
4758
+ readonly documentOnDropEditProvider: LanguageFeatureRegistry<DocumentOnDropEditProvider>;
4759
+ setNotebookTypeResolver(resolver: NotebookInfoResolver | undefined): void;
4760
+ }
4761
+
4762
+ export { IPromptResultWithCancel as $, IDialogHandler as A, IConfirmDialogArgs as B, Command as C, DialogType as D, EditorInput as E, IInputDialogArgs as F, GroupIdentifier as G, IPromptDialogArgs as H, ILanguageIdCodec as I, IBaseDialogOptions as J, ICheckbox as K, LanguageSelector as L, ICheckboxResult as M, ICustomDialogOptions as N, ICustomDialogMarkdown as O, IConfirmation as P, IConfirmationResult as Q, IInput as R, IInputResult as S, TextEdit as T, IInputElement as U, IPrompt as V, WorkspaceEdit as W, IPromptResult as X, IPromptBaseButton as Y, IPromptButton as Z, IPromptCancelButton as _, IEditorCloseEvent as a, IPromptWithCustomCancel as a0, IPromptWithDefaultCancel as a1, LanguageFeatureRegistry as a2, FoldingRangeProvider as a3, ITextFileEditorModel as a4, IVisibleEditorPane as b, EditorsOrder as c, IEditorIdentifier as d, IEditorGroup as e, IEditorPane as f, IUntitledTextResourceEditorInput as g, IResourceDiffEditorInput as h, ITextDiffEditorPane as i, IUntypedEditorInput as j, ICloseEditorOptions as k, IFindEditorOptions as l, IRevertOptions as m, ISaveOptions as n, IGroupModelChangeEvent as o, IInplaceReplaceSupportResult as p, WorkspaceEditMetadata as q, ILanguageConfigurationService as r, ILanguageFeaturesService as s, IDialogService as t, IMarkerService as u, IEditorGroupsService as v, ITextFileService as w, IWorkingCopyFileService as x, IDialogArgs as y, IDialogResult as z };