Updates monaco-editor-core & updates changelog.

This commit is contained in:
Henning Dieterichs 2022-07-20 14:30:49 +02:00
Родитель e2df88093a
Коммит c6e59c5f43
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 771381EFFDB9EC06
7 изменённых файлов: 1196 добавлений и 384 удалений

Просмотреть файл

@ -1,5 +1,31 @@
# Monaco Editor Changelog
## [0.34.0] (Unreleased)
- Introduction of `IEditor.createDecorationsCollection` API
- New function `removeAllMarkers` to remove all markers
- Support for light high contrast theme
- Introduction of `BracketPairColorizationOptions.independentColorPoolPerBracketType`
- Introduction of `PositionAffinity.LeftOfInjectedText` and `PositionAffinity.RightOfInjectedText`
- Introduction of `IEditorOptions.showFoldingControls: 'never'`
- Introduction of `IDiffEditorBaseOptions.renderMarginRevertIcon: boolean`
- Inline Quick Suggestions
- Introduction of `IContentWidgetPosition.positionAffinity`
- Provider can now be registered for a `LanguageSelector`
### Breaking Changes
- `IEditorInlayHintsOptions` tweaks
- Iteration on `InlineCompletion` API
- `WorkspaceFileEdit` -> `IWorkspaceFileEdit`
- `oldUri` -> `oldResource`
- `newUri` -> `newResource`
- `WorkspaceTextEdit` -> `IWorkspaceTextEdit`
- `edit` -> `textEdit` (now supports `insertAsSnippet`)
- `modelVersionId?: number` -> `versionId: number | undefined`
- `InlayHint` API tweaks
- Soft deprecation of `ICodeEditor.deltaDecorations`, no adoption required. `IEditor.createDecorationsCollection` API should be used instead.
## [0.33.0]
- The first parameter of all `monaco.languages.register*Provider` functions has changed to take a `DocumentSelector` instead of a single `languageId`

553
package-lock.json сгенерированный
Просмотреть файл

@ -14,14 +14,14 @@
"@typescript/vfs": "^1.3.5",
"chai": "^4.3.6",
"clean-css": "^5.2.4",
"esbuild": "^0.14.18",
"esbuild": "^0.14.49",
"esbuild-plugin-alias": "^0.2.1",
"glob": "^7.2.0",
"husky": "^7.0.4",
"jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0",
"mocha": "^9.2.0",
"monaco-editor-core": "0.33.0-dev.20220214",
"monaco-editor-core": "0.34.0-dev.20220720",
"playwright": "^1.18.1",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
@ -680,9 +680,9 @@
}
},
"node_modules/esbuild": {
"version": "0.14.18",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.18.tgz",
"integrity": "sha512-vCUoISSltnX7ax01w70pWOSQT+e55o+2P/a+A9MSTukJAt3T4aDZajcjeG4fnZbkvOEv+dkKgdkvljz6vVQD4A==",
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz",
"integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==",
"dev": true,
"hasInstallScript": true,
"bin": {
@ -692,30 +692,80 @@
"node": ">=12"
},
"optionalDependencies": {
"esbuild-android-arm64": "0.14.18",
"esbuild-darwin-64": "0.14.18",
"esbuild-darwin-arm64": "0.14.18",
"esbuild-freebsd-64": "0.14.18",
"esbuild-freebsd-arm64": "0.14.18",
"esbuild-linux-32": "0.14.18",
"esbuild-linux-64": "0.14.18",
"esbuild-linux-arm": "0.14.18",
"esbuild-linux-arm64": "0.14.18",
"esbuild-linux-mips64le": "0.14.18",
"esbuild-linux-ppc64le": "0.14.18",
"esbuild-linux-s390x": "0.14.18",
"esbuild-netbsd-64": "0.14.18",
"esbuild-openbsd-64": "0.14.18",
"esbuild-sunos-64": "0.14.18",
"esbuild-windows-32": "0.14.18",
"esbuild-windows-64": "0.14.18",
"esbuild-windows-arm64": "0.14.18"
"esbuild-android-64": "0.14.49",
"esbuild-android-arm64": "0.14.49",
"esbuild-darwin-64": "0.14.49",
"esbuild-darwin-arm64": "0.14.49",
"esbuild-freebsd-64": "0.14.49",
"esbuild-freebsd-arm64": "0.14.49",
"esbuild-linux-32": "0.14.49",
"esbuild-linux-64": "0.14.49",
"esbuild-linux-arm": "0.14.49",
"esbuild-linux-arm64": "0.14.49",
"esbuild-linux-mips64le": "0.14.49",
"esbuild-linux-ppc64le": "0.14.49",
"esbuild-linux-riscv64": "0.14.49",
"esbuild-linux-s390x": "0.14.49",
"esbuild-netbsd-64": "0.14.49",
"esbuild-openbsd-64": "0.14.49",
"esbuild-sunos-64": "0.14.49",
"esbuild-windows-32": "0.14.49",
"esbuild-windows-64": "0.14.49",
"esbuild-windows-arm64": "0.14.49"
}
},
"node_modules/esbuild-android-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz",
"integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-android-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz",
"integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-darwin-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz",
"integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-darwin-arm64": {
"version": "0.14.18",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.18.tgz",
"integrity": "sha512-v0i2n6TCsbxco/W1fN8RgQt3RW00Q9zJO2eqiAdmLWg6Hx0HNHloZyfhF11i7nMUUgW8r5n++ZweIXjAFPE/gQ==",
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz",
"integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==",
"cpu": [
"arm64"
],
@ -728,12 +778,268 @@
"node": ">=12"
}
},
"node_modules/esbuild-freebsd-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz",
"integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-freebsd-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz",
"integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-32": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz",
"integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz",
"integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-arm": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz",
"integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz",
"integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-mips64le": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz",
"integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==",
"cpu": [
"mips64el"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-ppc64le": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz",
"integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-riscv64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz",
"integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-linux-s390x": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz",
"integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-netbsd-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz",
"integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-openbsd-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz",
"integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-plugin-alias": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/esbuild-plugin-alias/-/esbuild-plugin-alias-0.2.1.tgz",
"integrity": "sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==",
"dev": true
},
"node_modules/esbuild-sunos-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz",
"integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-32": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz",
"integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz",
"integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/esbuild-windows-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz",
"integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@ -1517,9 +1823,9 @@
"dev": true
},
"node_modules/monaco-editor-core": {
"version": "0.33.0-dev.20220214",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.33.0-dev.20220214.tgz",
"integrity": "sha512-yKjt4XTLr0iN9lU0BqdErkLzOV5ntTLOEHyEJ9a3f46FUSeg/3k0R7H54hcgICMdTHRMcE1nuOfaisa4Lmg1FA==",
"version": "0.34.0-dev.20220720",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.34.0-dev.20220720.tgz",
"integrity": "sha512-V7LngspCeGiVOnvqPqVlrl3y9uSpoigE1+qAg95f/25vg661qTScOzyR3dpHPmiAUDnQLuaP+jkk/7r8fEB2OQ==",
"dev": true
},
"node_modules/mri": {
@ -3320,35 +3626,142 @@
}
},
"esbuild": {
"version": "0.14.18",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.18.tgz",
"integrity": "sha512-vCUoISSltnX7ax01w70pWOSQT+e55o+2P/a+A9MSTukJAt3T4aDZajcjeG4fnZbkvOEv+dkKgdkvljz6vVQD4A==",
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz",
"integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==",
"dev": true,
"requires": {
"esbuild-android-arm64": "0.14.18",
"esbuild-darwin-64": "0.14.18",
"esbuild-darwin-arm64": "0.14.18",
"esbuild-freebsd-64": "0.14.18",
"esbuild-freebsd-arm64": "0.14.18",
"esbuild-linux-32": "0.14.18",
"esbuild-linux-64": "0.14.18",
"esbuild-linux-arm": "0.14.18",
"esbuild-linux-arm64": "0.14.18",
"esbuild-linux-mips64le": "0.14.18",
"esbuild-linux-ppc64le": "0.14.18",
"esbuild-linux-s390x": "0.14.18",
"esbuild-netbsd-64": "0.14.18",
"esbuild-openbsd-64": "0.14.18",
"esbuild-sunos-64": "0.14.18",
"esbuild-windows-32": "0.14.18",
"esbuild-windows-64": "0.14.18",
"esbuild-windows-arm64": "0.14.18"
"esbuild-android-64": "0.14.49",
"esbuild-android-arm64": "0.14.49",
"esbuild-darwin-64": "0.14.49",
"esbuild-darwin-arm64": "0.14.49",
"esbuild-freebsd-64": "0.14.49",
"esbuild-freebsd-arm64": "0.14.49",
"esbuild-linux-32": "0.14.49",
"esbuild-linux-64": "0.14.49",
"esbuild-linux-arm": "0.14.49",
"esbuild-linux-arm64": "0.14.49",
"esbuild-linux-mips64le": "0.14.49",
"esbuild-linux-ppc64le": "0.14.49",
"esbuild-linux-riscv64": "0.14.49",
"esbuild-linux-s390x": "0.14.49",
"esbuild-netbsd-64": "0.14.49",
"esbuild-openbsd-64": "0.14.49",
"esbuild-sunos-64": "0.14.49",
"esbuild-windows-32": "0.14.49",
"esbuild-windows-64": "0.14.49",
"esbuild-windows-arm64": "0.14.49"
}
},
"esbuild-android-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz",
"integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==",
"dev": true,
"optional": true
},
"esbuild-android-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz",
"integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz",
"integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
"version": "0.14.18",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.18.tgz",
"integrity": "sha512-v0i2n6TCsbxco/W1fN8RgQt3RW00Q9zJO2eqiAdmLWg6Hx0HNHloZyfhF11i7nMUUgW8r5n++ZweIXjAFPE/gQ==",
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz",
"integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz",
"integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz",
"integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz",
"integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz",
"integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==",
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz",
"integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz",
"integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz",
"integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz",
"integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==",
"dev": true,
"optional": true
},
"esbuild-linux-riscv64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz",
"integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz",
"integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==",
"dev": true,
"optional": true
},
"esbuild-netbsd-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz",
"integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz",
"integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==",
"dev": true,
"optional": true
},
@ -3358,6 +3771,34 @@
"integrity": "sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==",
"dev": true
},
"esbuild-sunos-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz",
"integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz",
"integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz",
"integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
"version": "0.14.49",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz",
"integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==",
"dev": true,
"optional": true
},
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@ -3919,9 +4360,9 @@
}
},
"monaco-editor-core": {
"version": "0.33.0-dev.20220214",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.33.0-dev.20220214.tgz",
"integrity": "sha512-yKjt4XTLr0iN9lU0BqdErkLzOV5ntTLOEHyEJ9a3f46FUSeg/3k0R7H54hcgICMdTHRMcE1nuOfaisa4Lmg1FA==",
"version": "0.34.0-dev.20220720",
"resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.34.0-dev.20220720.tgz",
"integrity": "sha512-V7LngspCeGiVOnvqPqVlrl3y9uSpoigE1+qAg95f/25vg661qTScOzyR3dpHPmiAUDnQLuaP+jkk/7r8fEB2OQ==",
"dev": true
},
"mri": {

Просмотреть файл

@ -37,14 +37,14 @@
"@typescript/vfs": "^1.3.5",
"chai": "^4.3.6",
"clean-css": "^5.2.4",
"esbuild": "^0.14.18",
"esbuild": "^0.14.49",
"esbuild-plugin-alias": "^0.2.1",
"glob": "^7.2.0",
"husky": "^7.0.4",
"jsdom": "^19.0.0",
"jsonc-parser": "^3.0.0",
"mocha": "^9.2.0",
"monaco-editor-core": "0.33.0-dev.20220214",
"monaco-editor-core": "0.34.0-dev.20220720",
"playwright": "^1.18.1",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",

Просмотреть файл

@ -627,13 +627,14 @@ function toWorkspaceEdit(edit: lsTypes.WorkspaceEdit | null): languages.Workspac
if (!edit || !edit.changes) {
return void 0;
}
let resourceEdits: languages.WorkspaceTextEdit[] = [];
let resourceEdits: languages.IWorkspaceTextEdit[] = [];
for (let uri in edit.changes) {
const _uri = Uri.parse(uri);
for (let e of edit.changes[uri]) {
resourceEdits.push({
resource: _uri,
edit: {
versionId: undefined,
textEdit: {
range: toRange(e.range),
text: e.newText
}

Просмотреть файл

@ -1124,12 +1124,13 @@ export class CodeActionAdaptor extends FormatHelper implements languages.CodeAct
context: languages.CodeActionContext,
codeFix: ts.CodeFixAction
): languages.CodeAction {
const edits: languages.WorkspaceTextEdit[] = [];
const edits: languages.IWorkspaceTextEdit[] = [];
for (const change of codeFix.changes) {
for (const textChange of change.textChanges) {
edits.push({
resource: model.uri,
edit: {
versionId: undefined,
textEdit: {
range: this._textSpanToRange(model, textChange.span),
text: textChange.newText
}
@ -1197,13 +1198,14 @@ export class RenameAdapter extends Adapter implements languages.RenameProvider {
return;
}
const edits: languages.WorkspaceTextEdit[] = [];
const edits: languages.IWorkspaceTextEdit[] = [];
for (const renameLocation of renameLocations) {
const model = this._libFiles.getOrCreateModel(renameLocation.fileName);
if (model) {
edits.push({
resource: model.uri,
edit: {
versionId: undefined,
textEdit: {
range: this._textSpanToRange(model, renameLocation.textSpan),
text: newName
}

Просмотреть файл

@ -21,7 +21,7 @@ declare namespace monaco {
export interface Environment {
globalAPI?: boolean;
baseUrl?: string;
getWorker?(workerId: string, label: string): Worker;
getWorker?(workerId: string, label: string): Promise<Worker> | Worker;
getWorkerUrl?(workerId: string, label: string): string;
}
@ -409,11 +409,15 @@ declare namespace monaco {
LaunchMediaPlayer = 123,
LaunchMail = 124,
LaunchApp2 = 125,
/**
* VK_CLEAR, 0x0C, CLEAR key
*/
Clear = 126,
/**
* Placed last to cover the length of the enum.
* Please do not depend on this value!
*/
MAX_VALUE = 126
MAX_VALUE = 127
}
export class KeyMod {
static readonly CtrlCmd: number;
@ -891,6 +895,22 @@ declare namespace monaco.editor {
*/
export function onDidCreateEditor(listener: (codeEditor: ICodeEditor) => void): IDisposable;
/**
* Emitted when an diff editor is created.
* @event
*/
export function onDidCreateDiffEditor(listener: (diffEditor: IDiffEditor) => void): IDisposable;
/**
* Get all the created editors.
*/
export function getEditors(): readonly ICodeEditor[];
/**
* Get all the created diff editors.
*/
export function getDiffEditors(): readonly IDiffEditor[];
/**
* Create a new diff editor under `domElement`.
* `domElement` should be empty (not contain other dom nodes).
@ -922,6 +942,11 @@ declare namespace monaco.editor {
*/
export function setModelMarkers(model: ITextModel, owner: string, markers: IMarkerData[]): void;
/**
* Remove all markers of an owner.
*/
export function removeAllMarkers(owner: string): void;
/**
* Get markers for owner and/or resource
*
@ -974,7 +999,7 @@ declare namespace monaco.editor {
* Create a new web worker that has model syncing capabilities built in.
* Specify an AMD module to load that will `create` an object that will be proxied.
*/
export function createWebWorker<T>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
export function createWebWorker<T extends object>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
/**
* Colorize the contents of `domNode` using attribute `data-lang`.
@ -1016,7 +1041,7 @@ declare namespace monaco.editor {
*/
export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black';
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
export interface IStandaloneThemeData {
base: BuiltinTheme;
@ -1186,7 +1211,7 @@ declare namespace monaco.editor {
maxTokenizationLineLength?: number;
/**
* Theme to be used for rendering.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.
* You can create custom themes via `monaco.editor.defineTheme`.
* To switch a theme, use `monaco.editor.setTheme`.
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
@ -1219,7 +1244,7 @@ declare namespace monaco.editor {
language?: string;
/**
* Initial theme to be used for rendering.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.
* You can create custom themes via `monaco.editor.defineTheme`.
* To switch a theme, use `monaco.editor.setTheme`.
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
@ -1250,7 +1275,7 @@ declare namespace monaco.editor {
export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {
/**
* Initial theme to be used for rendering.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.
* You can create custom themes via `monaco.editor.defineTheme`.
* To switch a theme, use `monaco.editor.setTheme`.
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
@ -1266,13 +1291,13 @@ declare namespace monaco.editor {
export interface IStandaloneCodeEditor extends ICodeEditor {
updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
addAction(descriptor: IActionDescriptor): IDisposable;
}
export interface IStandaloneDiffEditor extends IDiffEditor {
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
addAction(descriptor: IActionDescriptor): IDisposable;
getOriginalEditor(): IStandaloneCodeEditor;
getModifiedEditor(): IStandaloneCodeEditor;
@ -1281,12 +1306,14 @@ declare namespace monaco.editor {
(...args: any[]): void;
}
export interface IContextKey<T> {
export interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {
set(value: T): void;
reset(): void;
get(): T | undefined;
}
export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;
export interface IEditorOverrideServices {
[index: string]: any;
}
@ -1461,6 +1488,7 @@ declare namespace monaco.editor {
* CSS class name describing the decoration.
*/
className?: string | null;
blockClassName?: string | null;
/**
* Message to be rendered when hovering over the glyph margin decoration.
*/
@ -1687,6 +1715,7 @@ declare namespace monaco.editor {
export interface BracketPairColorizationOptions {
enabled: boolean;
independentColorPoolPerBracketType: boolean;
}
export interface ITextModelUpdateOptions {
@ -2096,7 +2125,15 @@ declare namespace monaco.editor {
/**
* No preference.
*/
None = 2
None = 2,
/**
* If the given position is on injected text, prefers the position left of it.
*/
LeftOfInjectedText = 3,
/**
* If the given position is on injected text, prefers the position right of it.
*/
RightOfInjectedText = 4
}
/**
@ -2347,7 +2384,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IEditorViewState): void;
restoreViewState(state: IEditorViewState | null): void;
/**
* Given a position, returns a column number that takes tab-widths into account.
*/
@ -2498,6 +2535,47 @@ declare namespace monaco.editor {
* It is safe to call setModel(null) to simply detach the current model from the editor.
*/
setModel(model: IEditorModel | null): void;
/**
* Create a collection of decorations. All decorations added through this collection
* will get the ownerId of the editor (meaning they will not show up in other editors).
* These decorations will be automatically cleared when the editor's model changes.
*/
createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;
}
/**
* A collection of decorations
*/
export interface IEditorDecorationsCollection {
/**
* An event emitted when decorations change in the editor,
* but the change is not caused by us setting or clearing the collection.
*/
onDidChange: IEvent<IModelDecorationsChangedEvent>;
/**
* Get the decorations count.
*/
length: number;
/**
* Get the range for a decoration.
*/
getRange(index: number): Range | null;
/**
* Get all ranges for decorations.
*/
getRanges(): Range[];
/**
* Determine if a decoration is in this collection.
*/
has(decoration: IModelDecoration): boolean;
/**
* Replace all previous decorations with `newDecorations`.
*/
set(newDecorations: IModelDeltaDecoration[]): void;
/**
* Remove all previous decorations.
*/
clear(): void;
}
/**
@ -3252,7 +3330,7 @@ declare namespace monaco.editor {
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
* Defaults to 'mouseover'.
*/
showFoldingControls?: 'always' | 'mouseover';
showFoldingControls?: 'always' | 'never' | 'mouseover';
/**
* Controls whether clicking on the empty content after a folded line will unfold the line.
* Defaults to false.
@ -3346,6 +3424,12 @@ declare namespace monaco.editor {
* Configures bracket pair colorization (disabled by default).
*/
bracketPairColorization?: IBracketPairColorizationOptions;
/**
* Enables dropping into the editor from an external source.
*
* This shows a preview of the drop location and triggers an `onDropIntoEditor` event.
*/
enableDropIntoEditor?: boolean;
}
export interface IDiffEditorBaseOptions {
@ -3379,6 +3463,11 @@ declare namespace monaco.editor {
* Defaults to true.
*/
renderIndicators?: boolean;
/**
* Shows icons in the glyph margin to revert changes.
* Default to true.
*/
renderMarginRevertIcon?: boolean;
/**
* Original model should be editable?
* Defaults to false.
@ -3427,7 +3516,7 @@ declare namespace monaco.editor {
/**
* Might modify `value`.
*/
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
applyUpdate(value: V | undefined, update: V): ApplyUpdateResult<V>;
}
export class ApplyUpdateResult<T> {
@ -3713,7 +3802,7 @@ declare namespace monaco.editor {
* Enable the inline hints.
* Defaults to true.
*/
enabled?: boolean;
enabled?: 'on' | 'off' | 'offUnlessPressed' | 'onUnlessPressed';
/**
* Font size of inline hints.
* Default to 90% of the editor font size.
@ -3724,6 +3813,11 @@ declare namespace monaco.editor {
* Defaults to editor font family.
*/
fontFamily?: string;
/**
* Enables the padding around the inlay hint.
* Defaults to false.
*/
padding?: boolean;
}
/**
@ -3735,6 +3829,10 @@ declare namespace monaco.editor {
* Defaults to true.
*/
enabled?: boolean;
/**
* Control the rendering of minimap.
*/
autohide?: boolean;
/**
* Control the side of the minimap in editor.
* Defaults to 'right'.
@ -3796,13 +3894,21 @@ declare namespace monaco.editor {
cycle?: boolean;
}
export type QuickSuggestionsValue = 'on' | 'inline' | 'off';
/**
* Configuration options for quick suggestions
*/
export interface IQuickSuggestionsOptions {
other?: boolean;
comments?: boolean;
strings?: boolean;
other?: boolean | QuickSuggestionsValue;
comments?: boolean | QuickSuggestionsValue;
strings?: boolean | QuickSuggestionsValue;
}
export interface InternalQuickSuggestionsOptions {
readonly other: QuickSuggestionsValue;
readonly comments: QuickSuggestionsValue;
readonly strings: QuickSuggestionsValue;
}
export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
@ -3975,6 +4081,10 @@ declare namespace monaco.editor {
* Enable or disable bracket pair colorization.
*/
enabled?: boolean;
/**
* Use independent color pool per bracket type.
*/
independentColorPoolPerBracketType?: boolean;
}
export interface IGuidesOptions {
@ -4002,7 +4112,7 @@ declare namespace monaco.editor {
* Enable highlighting of the active indent guide.
* Defaults to true.
*/
highlightActiveIndentation?: boolean;
highlightActiveIndentation?: boolean | 'always';
}
/**
@ -4229,107 +4339,108 @@ declare namespace monaco.editor {
disableMonospaceOptimizations = 29,
domReadOnly = 30,
dragAndDrop = 31,
emptySelectionClipboard = 32,
extraEditorClassName = 33,
fastScrollSensitivity = 34,
find = 35,
fixedOverflowWidgets = 36,
folding = 37,
foldingStrategy = 38,
foldingHighlight = 39,
foldingImportsByDefault = 40,
foldingMaximumRegions = 41,
unfoldOnClickAfterEndOfLine = 42,
fontFamily = 43,
fontInfo = 44,
fontLigatures = 45,
fontSize = 46,
fontWeight = 47,
formatOnPaste = 48,
formatOnType = 49,
glyphMargin = 50,
gotoLocation = 51,
hideCursorInOverviewRuler = 52,
hover = 53,
inDiffEditor = 54,
inlineSuggest = 55,
letterSpacing = 56,
lightbulb = 57,
lineDecorationsWidth = 58,
lineHeight = 59,
lineNumbers = 60,
lineNumbersMinChars = 61,
linkedEditing = 62,
links = 63,
matchBrackets = 64,
minimap = 65,
mouseStyle = 66,
mouseWheelScrollSensitivity = 67,
mouseWheelZoom = 68,
multiCursorMergeOverlapping = 69,
multiCursorModifier = 70,
multiCursorPaste = 71,
occurrencesHighlight = 72,
overviewRulerBorder = 73,
overviewRulerLanes = 74,
padding = 75,
parameterHints = 76,
peekWidgetDefaultFocus = 77,
definitionLinkOpensInPeek = 78,
quickSuggestions = 79,
quickSuggestionsDelay = 80,
readOnly = 81,
renameOnType = 82,
renderControlCharacters = 83,
renderFinalNewline = 84,
renderLineHighlight = 85,
renderLineHighlightOnlyWhenFocus = 86,
renderValidationDecorations = 87,
renderWhitespace = 88,
revealHorizontalRightPadding = 89,
roundedSelection = 90,
rulers = 91,
scrollbar = 92,
scrollBeyondLastColumn = 93,
scrollBeyondLastLine = 94,
scrollPredominantAxis = 95,
selectionClipboard = 96,
selectionHighlight = 97,
selectOnLineNumbers = 98,
showFoldingControls = 99,
showUnused = 100,
snippetSuggestions = 101,
smartSelect = 102,
smoothScrolling = 103,
stickyTabStops = 104,
stopRenderingLineAfter = 105,
suggest = 106,
suggestFontSize = 107,
suggestLineHeight = 108,
suggestOnTriggerCharacters = 109,
suggestSelection = 110,
tabCompletion = 111,
tabIndex = 112,
unicodeHighlighting = 113,
unusualLineTerminators = 114,
useShadowDOM = 115,
useTabStops = 116,
wordSeparators = 117,
wordWrap = 118,
wordWrapBreakAfterCharacters = 119,
wordWrapBreakBeforeCharacters = 120,
wordWrapColumn = 121,
wordWrapOverride1 = 122,
wordWrapOverride2 = 123,
wrappingIndent = 124,
wrappingStrategy = 125,
showDeprecated = 126,
inlayHints = 127,
editorClassName = 128,
pixelRatio = 129,
tabFocusMode = 130,
layoutInfo = 131,
wrappingInfo = 132
enableDropIntoEditor = 32,
emptySelectionClipboard = 33,
extraEditorClassName = 34,
fastScrollSensitivity = 35,
find = 36,
fixedOverflowWidgets = 37,
folding = 38,
foldingStrategy = 39,
foldingHighlight = 40,
foldingImportsByDefault = 41,
foldingMaximumRegions = 42,
unfoldOnClickAfterEndOfLine = 43,
fontFamily = 44,
fontInfo = 45,
fontLigatures = 46,
fontSize = 47,
fontWeight = 48,
formatOnPaste = 49,
formatOnType = 50,
glyphMargin = 51,
gotoLocation = 52,
hideCursorInOverviewRuler = 53,
hover = 54,
inDiffEditor = 55,
inlineSuggest = 56,
letterSpacing = 57,
lightbulb = 58,
lineDecorationsWidth = 59,
lineHeight = 60,
lineNumbers = 61,
lineNumbersMinChars = 62,
linkedEditing = 63,
links = 64,
matchBrackets = 65,
minimap = 66,
mouseStyle = 67,
mouseWheelScrollSensitivity = 68,
mouseWheelZoom = 69,
multiCursorMergeOverlapping = 70,
multiCursorModifier = 71,
multiCursorPaste = 72,
occurrencesHighlight = 73,
overviewRulerBorder = 74,
overviewRulerLanes = 75,
padding = 76,
parameterHints = 77,
peekWidgetDefaultFocus = 78,
definitionLinkOpensInPeek = 79,
quickSuggestions = 80,
quickSuggestionsDelay = 81,
readOnly = 82,
renameOnType = 83,
renderControlCharacters = 84,
renderFinalNewline = 85,
renderLineHighlight = 86,
renderLineHighlightOnlyWhenFocus = 87,
renderValidationDecorations = 88,
renderWhitespace = 89,
revealHorizontalRightPadding = 90,
roundedSelection = 91,
rulers = 92,
scrollbar = 93,
scrollBeyondLastColumn = 94,
scrollBeyondLastLine = 95,
scrollPredominantAxis = 96,
selectionClipboard = 97,
selectionHighlight = 98,
selectOnLineNumbers = 99,
showFoldingControls = 100,
showUnused = 101,
snippetSuggestions = 102,
smartSelect = 103,
smoothScrolling = 104,
stickyTabStops = 105,
stopRenderingLineAfter = 106,
suggest = 107,
suggestFontSize = 108,
suggestLineHeight = 109,
suggestOnTriggerCharacters = 110,
suggestSelection = 111,
tabCompletion = 112,
tabIndex = 113,
unicodeHighlighting = 114,
unusualLineTerminators = 115,
useShadowDOM = 116,
useTabStops = 117,
wordSeparators = 118,
wordWrap = 119,
wordWrapBreakAfterCharacters = 120,
wordWrapBreakBeforeCharacters = 121,
wordWrapColumn = 122,
wordWrapOverride1 = 123,
wordWrapOverride2 = 124,
wrappingIndent = 125,
wrappingStrategy = 126,
showDeprecated = 127,
inlayHints = 128,
editorClassName = 129,
pixelRatio = 130,
tabFocusMode = 131,
layoutInfo = 132,
wrappingInfo = 133
}
export const EditorOptions: {
@ -4367,6 +4478,7 @@ declare namespace monaco.editor {
domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
enableDropIntoEditor: IEditorOption<EditorOption.enableDropIntoEditor, boolean>;
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
@ -4412,7 +4524,7 @@ declare namespace monaco.editor {
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, any>;
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;
quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
@ -4432,7 +4544,7 @@ declare namespace monaco.editor {
selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;
selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;
selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'never' | 'mouseover'>;
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;
@ -4448,7 +4560,7 @@ declare namespace monaco.editor {
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, any>;
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
@ -4609,6 +4721,11 @@ declare namespace monaco.editor {
* Placement preference for position, in order of preference.
*/
preference: ContentWidgetPositionPreference[];
/**
* Placement preference when multiple view positions refer to the same (model) position.
* This plays a role when injected text is involved.
*/
positionAffinity?: PositionAffinity;
}
/**
@ -5069,7 +5186,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: ICodeEditorViewState): void;
restoreViewState(state: ICodeEditorViewState | null): void;
/**
* Returns true if the text inside this editor or an editor widget has focus.
*/
@ -5201,9 +5318,13 @@ declare namespace monaco.editor {
getDecorationsInRange(range: Range): IModelDecoration[] | null;
/**
* All decorations added through this call will get the ownerId of this editor.
* @see {@link ITextModel.deltaDecorations}
* @deprecated
*/
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
/**
* Remove previously added decorations.
*/
removeDecorations(decorationIds: string[]): void;
/**
* Get the layout info for the editor.
*/
@ -5322,7 +5443,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IDiffEditorViewState): void;
restoreViewState(state: IDiffEditorViewState | null): void;
/**
* Type the getModel() of IEditor.
*/
@ -5396,6 +5517,34 @@ declare namespace monaco.editor {
declare namespace monaco.languages {
export interface IRelativePattern {
/**
* A base file path to which this pattern will be matched against relatively.
*/
readonly base: string;
/**
* A file glob pattern like `*.{ts,js}` that will be matched on file paths
* relative to the base path.
*
* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,
* the file glob pattern will match on `index.js`.
*/
readonly pattern: string;
}
export type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
export interface LanguageFilter {
readonly language?: string;
readonly scheme?: string;
readonly pattern?: string | IRelativePattern;
readonly notebookType?: string;
/**
* This provider is implemented in the UI thread.
*/
readonly hasAccessToAllModels?: boolean;
readonly exclusive?: boolean;
}
/**
* Register information about a new language.
@ -5546,107 +5695,107 @@ declare namespace monaco.languages {
/**
* Register a reference provider (used by e.g. reference search).
*/
export function registerReferenceProvider(languageId: string, provider: ReferenceProvider): IDisposable;
export function registerReferenceProvider(languageSelector: LanguageSelector, provider: ReferenceProvider): IDisposable;
/**
* Register a rename provider (used by e.g. rename symbol).
*/
export function registerRenameProvider(languageId: string, provider: RenameProvider): IDisposable;
export function registerRenameProvider(languageSelector: LanguageSelector, provider: RenameProvider): IDisposable;
/**
* Register a signature help provider (used by e.g. parameter hints).
*/
export function registerSignatureHelpProvider(languageId: string, provider: SignatureHelpProvider): IDisposable;
export function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: SignatureHelpProvider): IDisposable;
/**
* Register a hover provider (used by e.g. editor hover).
*/
export function registerHoverProvider(languageId: string, provider: HoverProvider): IDisposable;
export function registerHoverProvider(languageSelector: LanguageSelector, provider: HoverProvider): IDisposable;
/**
* Register a document symbol provider (used by e.g. outline).
*/
export function registerDocumentSymbolProvider(languageId: string, provider: DocumentSymbolProvider): IDisposable;
export function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: DocumentSymbolProvider): IDisposable;
/**
* Register a document highlight provider (used by e.g. highlight occurrences).
*/
export function registerDocumentHighlightProvider(languageId: string, provider: DocumentHighlightProvider): IDisposable;
export function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: DocumentHighlightProvider): IDisposable;
/**
* Register an linked editing range provider.
*/
export function registerLinkedEditingRangeProvider(languageId: string, provider: LinkedEditingRangeProvider): IDisposable;
export function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: LinkedEditingRangeProvider): IDisposable;
/**
* Register a definition provider (used by e.g. go to definition).
*/
export function registerDefinitionProvider(languageId: string, provider: DefinitionProvider): IDisposable;
export function registerDefinitionProvider(languageSelector: LanguageSelector, provider: DefinitionProvider): IDisposable;
/**
* Register a implementation provider (used by e.g. go to implementation).
*/
export function registerImplementationProvider(languageId: string, provider: ImplementationProvider): IDisposable;
export function registerImplementationProvider(languageSelector: LanguageSelector, provider: ImplementationProvider): IDisposable;
/**
* Register a type definition provider (used by e.g. go to type definition).
*/
export function registerTypeDefinitionProvider(languageId: string, provider: TypeDefinitionProvider): IDisposable;
export function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: TypeDefinitionProvider): IDisposable;
/**
* Register a code lens provider (used by e.g. inline code lenses).
*/
export function registerCodeLensProvider(languageId: string, provider: CodeLensProvider): IDisposable;
export function registerCodeLensProvider(languageSelector: LanguageSelector, provider: CodeLensProvider): IDisposable;
/**
* Register a code action provider (used by e.g. quick fix).
*/
export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
export function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
/**
* Register a formatter that can handle only entire models.
*/
export function registerDocumentFormattingEditProvider(languageId: string, provider: DocumentFormattingEditProvider): IDisposable;
export function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;
/**
* Register a formatter that can handle a range inside a model.
*/
export function registerDocumentRangeFormattingEditProvider(languageId: string, provider: DocumentRangeFormattingEditProvider): IDisposable;
export function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;
/**
* Register a formatter than can do formatting as the user types.
*/
export function registerOnTypeFormattingEditProvider(languageId: string, provider: OnTypeFormattingEditProvider): IDisposable;
export function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;
/**
* Register a link provider that can find links in text.
*/
export function registerLinkProvider(languageId: string, provider: LinkProvider): IDisposable;
export function registerLinkProvider(languageSelector: LanguageSelector, provider: LinkProvider): IDisposable;
/**
* Register a completion item provider (use by e.g. suggestions).
*/
export function registerCompletionItemProvider(languageId: string, provider: CompletionItemProvider): IDisposable;
export function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: CompletionItemProvider): IDisposable;
/**
* Register a document color provider (used by Color Picker, Color Decorator).
*/
export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable;
export function registerColorProvider(languageSelector: LanguageSelector, provider: DocumentColorProvider): IDisposable;
/**
* Register a folding range provider
*/
export function registerFoldingRangeProvider(languageId: string, provider: FoldingRangeProvider): IDisposable;
export function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: FoldingRangeProvider): IDisposable;
/**
* Register a declaration provider
*/
export function registerDeclarationProvider(languageId: string, provider: DeclarationProvider): IDisposable;
export function registerDeclarationProvider(languageSelector: LanguageSelector, provider: DeclarationProvider): IDisposable;
/**
* Register a selection range provider
*/
export function registerSelectionRangeProvider(languageId: string, provider: SelectionRangeProvider): IDisposable;
export function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: SelectionRangeProvider): IDisposable;
/**
* Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a
@ -5655,7 +5804,7 @@ declare namespace monaco.languages {
*
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
*/
export function registerDocumentSemanticTokensProvider(languageId: string, provider: DocumentSemanticTokensProvider): IDisposable;
export function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;
/**
* Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a
@ -5664,17 +5813,17 @@ declare namespace monaco.languages {
*
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
*/
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
export function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;
/**
* Register an inline completions provider.
*/
export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable;
export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;
/**
* Register an inlay hints provider.
*/
export function registerInlayHintsProvider(languageId: string, provider: InlayHintsProvider): IDisposable;
export function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: InlayHintsProvider): IDisposable;
/**
* Contains additional diagnostic information about the context in which
@ -6230,8 +6379,24 @@ declare namespace monaco.languages {
* The text to insert.
* If the text contains a line break, the range must end at the end of a line.
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
*
* The text can also be a snippet. In that case, a preview with default parameters is shown.
* When accepting the suggestion, the full snippet is inserted.
*/
readonly text: string;
readonly insertText: string | {
snippet: string;
};
/**
* A text that is used to decide if this inline completion should be shown.
* An inline completion is shown if the text to replace is a subword of the filter text.
*/
readonly filterText?: string;
/**
* An optional array of additional text edits that are applied when
* selecting this completion. Edits must not overlap with the main edit
* nor with themselves.
*/
readonly additionalTextEdits?: editor.ISingleEditOperation[];
/**
* The range to replace.
* Must begin and end on the same line.
@ -6247,6 +6412,10 @@ declare namespace monaco.languages {
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
readonly items: readonly TItem[];
/**
* A list of commands associated with the inline completions of this list.
*/
readonly commands?: Command[];
}
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
@ -6851,22 +7020,24 @@ declare namespace monaco.languages {
maxSize?: number;
}
export interface WorkspaceFileEdit {
oldUri?: Uri;
newUri?: Uri;
export interface IWorkspaceFileEdit {
oldResource?: Uri;
newResource?: Uri;
options?: WorkspaceFileEditOptions;
metadata?: WorkspaceEditMetadata;
}
export interface WorkspaceTextEdit {
export interface IWorkspaceTextEdit {
resource: Uri;
edit: TextEdit;
modelVersionId?: number;
textEdit: TextEdit & {
insertAsSnippet?: boolean;
};
versionId: number | undefined;
metadata?: WorkspaceEditMetadata;
}
export interface WorkspaceEdit {
edits: Array<WorkspaceTextEdit | WorkspaceFileEdit>;
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
}
export interface Rejection {
@ -6922,7 +7093,7 @@ declare namespace monaco.languages {
export interface InlayHint {
label: string | InlayHintLabelPart[];
tooltip?: string | IMarkdownString;
command?: Command;
textEdits?: TextEdit[];
position: IPosition;
kind?: InlayHintKind;
paddingLeft?: boolean;

491
website/typedoc/monaco.d.ts поставляемый
Просмотреть файл

@ -21,7 +21,7 @@ declare namespace monaco {
export interface Environment {
globalAPI?: boolean;
baseUrl?: string;
getWorker?(workerId: string, label: string): Worker;
getWorker?(workerId: string, label: string): Promise<Worker> | Worker;
getWorkerUrl?(workerId: string, label: string): string;
}
@ -409,11 +409,15 @@ declare namespace monaco {
LaunchMediaPlayer = 123,
LaunchMail = 124,
LaunchApp2 = 125,
/**
* VK_CLEAR, 0x0C, CLEAR key
*/
Clear = 126,
/**
* Placed last to cover the length of the enum.
* Please do not depend on this value!
*/
MAX_VALUE = 126
MAX_VALUE = 127
}
export class KeyMod {
static readonly CtrlCmd: number;
@ -891,6 +895,22 @@ declare namespace monaco.editor {
*/
export function onDidCreateEditor(listener: (codeEditor: ICodeEditor) => void): IDisposable;
/**
* Emitted when an diff editor is created.
* @event
*/
export function onDidCreateDiffEditor(listener: (diffEditor: IDiffEditor) => void): IDisposable;
/**
* Get all the created editors.
*/
export function getEditors(): readonly ICodeEditor[];
/**
* Get all the created diff editors.
*/
export function getDiffEditors(): readonly IDiffEditor[];
/**
* Create a new diff editor under `domElement`.
* `domElement` should be empty (not contain other dom nodes).
@ -922,6 +942,11 @@ declare namespace monaco.editor {
*/
export function setModelMarkers(model: ITextModel, owner: string, markers: IMarkerData[]): void;
/**
* Remove all markers of an owner.
*/
export function removeAllMarkers(owner: string): void;
/**
* Get markers for owner and/or resource
*
@ -974,7 +999,7 @@ declare namespace monaco.editor {
* Create a new web worker that has model syncing capabilities built in.
* Specify an AMD module to load that will `create` an object that will be proxied.
*/
export function createWebWorker<T>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
export function createWebWorker<T extends object>(opts: IWebWorkerOptions): MonacoWebWorker<T>;
/**
* Colorize the contents of `domNode` using attribute `data-lang`.
@ -1016,7 +1041,7 @@ declare namespace monaco.editor {
*/
export function registerCommand(id: string, handler: (accessor: any, ...args: any[]) => void): IDisposable;
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black';
export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black' | 'hc-light';
export interface IStandaloneThemeData {
base: BuiltinTheme;
@ -1186,7 +1211,7 @@ declare namespace monaco.editor {
maxTokenizationLineLength?: number;
/**
* Theme to be used for rendering.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light'.
* You can create custom themes via `monaco.editor.defineTheme`.
* To switch a theme, use `monaco.editor.setTheme`.
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
@ -1219,7 +1244,7 @@ declare namespace monaco.editor {
language?: string;
/**
* Initial theme to be used for rendering.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.
* You can create custom themes via `monaco.editor.defineTheme`.
* To switch a theme, use `monaco.editor.setTheme`.
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
@ -1250,7 +1275,7 @@ declare namespace monaco.editor {
export interface IStandaloneDiffEditorConstructionOptions extends IDiffEditorConstructionOptions {
/**
* Initial theme to be used for rendering.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'.
* The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black', 'hc-light.
* You can create custom themes via `monaco.editor.defineTheme`.
* To switch a theme, use `monaco.editor.setTheme`.
* **NOTE**: The theme might be overwritten if the OS is in high contrast mode, unless `autoDetectHighContrast` is set to false.
@ -1266,13 +1291,13 @@ declare namespace monaco.editor {
export interface IStandaloneCodeEditor extends ICodeEditor {
updateOptions(newOptions: IEditorOptions & IGlobalEditorOptions): void;
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
addAction(descriptor: IActionDescriptor): IDisposable;
}
export interface IStandaloneDiffEditor extends IDiffEditor {
addCommand(keybinding: number, handler: ICommandHandler, context?: string): string | null;
createContextKey<T>(key: string, defaultValue: T): IContextKey<T>;
createContextKey<T extends ContextKeyValue = ContextKeyValue>(key: string, defaultValue: T): IContextKey<T>;
addAction(descriptor: IActionDescriptor): IDisposable;
getOriginalEditor(): IStandaloneCodeEditor;
getModifiedEditor(): IStandaloneCodeEditor;
@ -1281,12 +1306,14 @@ declare namespace monaco.editor {
(...args: any[]): void;
}
export interface IContextKey<T> {
export interface IContextKey<T extends ContextKeyValue = ContextKeyValue> {
set(value: T): void;
reset(): void;
get(): T | undefined;
}
export type ContextKeyValue = null | undefined | boolean | number | string | Array<null | undefined | boolean | number | string> | Record<string, null | undefined | boolean | number | string>;
export interface IEditorOverrideServices {
[index: string]: any;
}
@ -1461,6 +1488,7 @@ declare namespace monaco.editor {
* CSS class name describing the decoration.
*/
className?: string | null;
blockClassName?: string | null;
/**
* Message to be rendered when hovering over the glyph margin decoration.
*/
@ -1687,6 +1715,7 @@ declare namespace monaco.editor {
export interface BracketPairColorizationOptions {
enabled: boolean;
independentColorPoolPerBracketType: boolean;
}
export interface ITextModelUpdateOptions {
@ -2096,7 +2125,15 @@ declare namespace monaco.editor {
/**
* No preference.
*/
None = 2
None = 2,
/**
* If the given position is on injected text, prefers the position left of it.
*/
LeftOfInjectedText = 3,
/**
* If the given position is on injected text, prefers the position right of it.
*/
RightOfInjectedText = 4
}
/**
@ -2347,7 +2384,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IEditorViewState): void;
restoreViewState(state: IEditorViewState | null): void;
/**
* Given a position, returns a column number that takes tab-widths into account.
*/
@ -2498,6 +2535,47 @@ declare namespace monaco.editor {
* It is safe to call setModel(null) to simply detach the current model from the editor.
*/
setModel(model: IEditorModel | null): void;
/**
* Create a collection of decorations. All decorations added through this collection
* will get the ownerId of the editor (meaning they will not show up in other editors).
* These decorations will be automatically cleared when the editor's model changes.
*/
createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;
}
/**
* A collection of decorations
*/
export interface IEditorDecorationsCollection {
/**
* An event emitted when decorations change in the editor,
* but the change is not caused by us setting or clearing the collection.
*/
onDidChange: IEvent<IModelDecorationsChangedEvent>;
/**
* Get the decorations count.
*/
length: number;
/**
* Get the range for a decoration.
*/
getRange(index: number): Range | null;
/**
* Get all ranges for decorations.
*/
getRanges(): Range[];
/**
* Determine if a decoration is in this collection.
*/
has(decoration: IModelDecoration): boolean;
/**
* Replace all previous decorations with `newDecorations`.
*/
set(newDecorations: IModelDeltaDecoration[]): void;
/**
* Remove all previous decorations.
*/
clear(): void;
}
/**
@ -3252,7 +3330,7 @@ declare namespace monaco.editor {
* Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter.
* Defaults to 'mouseover'.
*/
showFoldingControls?: 'always' | 'mouseover';
showFoldingControls?: 'always' | 'never' | 'mouseover';
/**
* Controls whether clicking on the empty content after a folded line will unfold the line.
* Defaults to false.
@ -3346,6 +3424,12 @@ declare namespace monaco.editor {
* Configures bracket pair colorization (disabled by default).
*/
bracketPairColorization?: IBracketPairColorizationOptions;
/**
* Enables dropping into the editor from an external source.
*
* This shows a preview of the drop location and triggers an `onDropIntoEditor` event.
*/
enableDropIntoEditor?: boolean;
}
export interface IDiffEditorBaseOptions {
@ -3379,6 +3463,11 @@ declare namespace monaco.editor {
* Defaults to true.
*/
renderIndicators?: boolean;
/**
* Shows icons in the glyph margin to revert changes.
* Default to true.
*/
renderMarginRevertIcon?: boolean;
/**
* Original model should be editable?
* Defaults to false.
@ -3427,7 +3516,7 @@ declare namespace monaco.editor {
/**
* Might modify `value`.
*/
applyUpdate(value: V, update: V): ApplyUpdateResult<V>;
applyUpdate(value: V | undefined, update: V): ApplyUpdateResult<V>;
}
export class ApplyUpdateResult<T> {
@ -3713,7 +3802,7 @@ declare namespace monaco.editor {
* Enable the inline hints.
* Defaults to true.
*/
enabled?: boolean;
enabled?: 'on' | 'off' | 'offUnlessPressed' | 'onUnlessPressed';
/**
* Font size of inline hints.
* Default to 90% of the editor font size.
@ -3724,6 +3813,11 @@ declare namespace monaco.editor {
* Defaults to editor font family.
*/
fontFamily?: string;
/**
* Enables the padding around the inlay hint.
* Defaults to false.
*/
padding?: boolean;
}
/**
@ -3735,6 +3829,10 @@ declare namespace monaco.editor {
* Defaults to true.
*/
enabled?: boolean;
/**
* Control the rendering of minimap.
*/
autohide?: boolean;
/**
* Control the side of the minimap in editor.
* Defaults to 'right'.
@ -3796,13 +3894,21 @@ declare namespace monaco.editor {
cycle?: boolean;
}
export type QuickSuggestionsValue = 'on' | 'inline' | 'off';
/**
* Configuration options for quick suggestions
*/
export interface IQuickSuggestionsOptions {
other?: boolean;
comments?: boolean;
strings?: boolean;
other?: boolean | QuickSuggestionsValue;
comments?: boolean | QuickSuggestionsValue;
strings?: boolean | QuickSuggestionsValue;
}
export interface InternalQuickSuggestionsOptions {
readonly other: QuickSuggestionsValue;
readonly comments: QuickSuggestionsValue;
readonly strings: QuickSuggestionsValue;
}
export type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
@ -3975,6 +4081,10 @@ declare namespace monaco.editor {
* Enable or disable bracket pair colorization.
*/
enabled?: boolean;
/**
* Use independent color pool per bracket type.
*/
independentColorPoolPerBracketType?: boolean;
}
export interface IGuidesOptions {
@ -4002,7 +4112,7 @@ declare namespace monaco.editor {
* Enable highlighting of the active indent guide.
* Defaults to true.
*/
highlightActiveIndentation?: boolean;
highlightActiveIndentation?: boolean | 'always';
}
/**
@ -4229,107 +4339,108 @@ declare namespace monaco.editor {
disableMonospaceOptimizations = 29,
domReadOnly = 30,
dragAndDrop = 31,
emptySelectionClipboard = 32,
extraEditorClassName = 33,
fastScrollSensitivity = 34,
find = 35,
fixedOverflowWidgets = 36,
folding = 37,
foldingStrategy = 38,
foldingHighlight = 39,
foldingImportsByDefault = 40,
foldingMaximumRegions = 41,
unfoldOnClickAfterEndOfLine = 42,
fontFamily = 43,
fontInfo = 44,
fontLigatures = 45,
fontSize = 46,
fontWeight = 47,
formatOnPaste = 48,
formatOnType = 49,
glyphMargin = 50,
gotoLocation = 51,
hideCursorInOverviewRuler = 52,
hover = 53,
inDiffEditor = 54,
inlineSuggest = 55,
letterSpacing = 56,
lightbulb = 57,
lineDecorationsWidth = 58,
lineHeight = 59,
lineNumbers = 60,
lineNumbersMinChars = 61,
linkedEditing = 62,
links = 63,
matchBrackets = 64,
minimap = 65,
mouseStyle = 66,
mouseWheelScrollSensitivity = 67,
mouseWheelZoom = 68,
multiCursorMergeOverlapping = 69,
multiCursorModifier = 70,
multiCursorPaste = 71,
occurrencesHighlight = 72,
overviewRulerBorder = 73,
overviewRulerLanes = 74,
padding = 75,
parameterHints = 76,
peekWidgetDefaultFocus = 77,
definitionLinkOpensInPeek = 78,
quickSuggestions = 79,
quickSuggestionsDelay = 80,
readOnly = 81,
renameOnType = 82,
renderControlCharacters = 83,
renderFinalNewline = 84,
renderLineHighlight = 85,
renderLineHighlightOnlyWhenFocus = 86,
renderValidationDecorations = 87,
renderWhitespace = 88,
revealHorizontalRightPadding = 89,
roundedSelection = 90,
rulers = 91,
scrollbar = 92,
scrollBeyondLastColumn = 93,
scrollBeyondLastLine = 94,
scrollPredominantAxis = 95,
selectionClipboard = 96,
selectionHighlight = 97,
selectOnLineNumbers = 98,
showFoldingControls = 99,
showUnused = 100,
snippetSuggestions = 101,
smartSelect = 102,
smoothScrolling = 103,
stickyTabStops = 104,
stopRenderingLineAfter = 105,
suggest = 106,
suggestFontSize = 107,
suggestLineHeight = 108,
suggestOnTriggerCharacters = 109,
suggestSelection = 110,
tabCompletion = 111,
tabIndex = 112,
unicodeHighlighting = 113,
unusualLineTerminators = 114,
useShadowDOM = 115,
useTabStops = 116,
wordSeparators = 117,
wordWrap = 118,
wordWrapBreakAfterCharacters = 119,
wordWrapBreakBeforeCharacters = 120,
wordWrapColumn = 121,
wordWrapOverride1 = 122,
wordWrapOverride2 = 123,
wrappingIndent = 124,
wrappingStrategy = 125,
showDeprecated = 126,
inlayHints = 127,
editorClassName = 128,
pixelRatio = 129,
tabFocusMode = 130,
layoutInfo = 131,
wrappingInfo = 132
enableDropIntoEditor = 32,
emptySelectionClipboard = 33,
extraEditorClassName = 34,
fastScrollSensitivity = 35,
find = 36,
fixedOverflowWidgets = 37,
folding = 38,
foldingStrategy = 39,
foldingHighlight = 40,
foldingImportsByDefault = 41,
foldingMaximumRegions = 42,
unfoldOnClickAfterEndOfLine = 43,
fontFamily = 44,
fontInfo = 45,
fontLigatures = 46,
fontSize = 47,
fontWeight = 48,
formatOnPaste = 49,
formatOnType = 50,
glyphMargin = 51,
gotoLocation = 52,
hideCursorInOverviewRuler = 53,
hover = 54,
inDiffEditor = 55,
inlineSuggest = 56,
letterSpacing = 57,
lightbulb = 58,
lineDecorationsWidth = 59,
lineHeight = 60,
lineNumbers = 61,
lineNumbersMinChars = 62,
linkedEditing = 63,
links = 64,
matchBrackets = 65,
minimap = 66,
mouseStyle = 67,
mouseWheelScrollSensitivity = 68,
mouseWheelZoom = 69,
multiCursorMergeOverlapping = 70,
multiCursorModifier = 71,
multiCursorPaste = 72,
occurrencesHighlight = 73,
overviewRulerBorder = 74,
overviewRulerLanes = 75,
padding = 76,
parameterHints = 77,
peekWidgetDefaultFocus = 78,
definitionLinkOpensInPeek = 79,
quickSuggestions = 80,
quickSuggestionsDelay = 81,
readOnly = 82,
renameOnType = 83,
renderControlCharacters = 84,
renderFinalNewline = 85,
renderLineHighlight = 86,
renderLineHighlightOnlyWhenFocus = 87,
renderValidationDecorations = 88,
renderWhitespace = 89,
revealHorizontalRightPadding = 90,
roundedSelection = 91,
rulers = 92,
scrollbar = 93,
scrollBeyondLastColumn = 94,
scrollBeyondLastLine = 95,
scrollPredominantAxis = 96,
selectionClipboard = 97,
selectionHighlight = 98,
selectOnLineNumbers = 99,
showFoldingControls = 100,
showUnused = 101,
snippetSuggestions = 102,
smartSelect = 103,
smoothScrolling = 104,
stickyTabStops = 105,
stopRenderingLineAfter = 106,
suggest = 107,
suggestFontSize = 108,
suggestLineHeight = 109,
suggestOnTriggerCharacters = 110,
suggestSelection = 111,
tabCompletion = 112,
tabIndex = 113,
unicodeHighlighting = 114,
unusualLineTerminators = 115,
useShadowDOM = 116,
useTabStops = 117,
wordSeparators = 118,
wordWrap = 119,
wordWrapBreakAfterCharacters = 120,
wordWrapBreakBeforeCharacters = 121,
wordWrapColumn = 122,
wordWrapOverride1 = 123,
wordWrapOverride2 = 124,
wrappingIndent = 125,
wrappingStrategy = 126,
showDeprecated = 127,
inlayHints = 128,
editorClassName = 129,
pixelRatio = 130,
tabFocusMode = 131,
layoutInfo = 132,
wrappingInfo = 133
}
export const EditorOptions: {
@ -4367,6 +4478,7 @@ declare namespace monaco.editor {
domReadOnly: IEditorOption<EditorOption.domReadOnly, boolean>;
dragAndDrop: IEditorOption<EditorOption.dragAndDrop, boolean>;
emptySelectionClipboard: IEditorOption<EditorOption.emptySelectionClipboard, boolean>;
enableDropIntoEditor: IEditorOption<EditorOption.enableDropIntoEditor, boolean>;
extraEditorClassName: IEditorOption<EditorOption.extraEditorClassName, string>;
fastScrollSensitivity: IEditorOption<EditorOption.fastScrollSensitivity, number>;
find: IEditorOption<EditorOption.find, Readonly<Required<IEditorFindOptions>>>;
@ -4412,7 +4524,7 @@ declare namespace monaco.editor {
parameterHints: IEditorOption<EditorOption.parameterHints, Readonly<Required<IEditorParameterHintOptions>>>;
peekWidgetDefaultFocus: IEditorOption<EditorOption.peekWidgetDefaultFocus, 'tree' | 'editor'>;
definitionLinkOpensInPeek: IEditorOption<EditorOption.definitionLinkOpensInPeek, boolean>;
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, any>;
quickSuggestions: IEditorOption<EditorOption.quickSuggestions, InternalQuickSuggestionsOptions>;
quickSuggestionsDelay: IEditorOption<EditorOption.quickSuggestionsDelay, number>;
readOnly: IEditorOption<EditorOption.readOnly, boolean>;
renameOnType: IEditorOption<EditorOption.renameOnType, boolean>;
@ -4432,7 +4544,7 @@ declare namespace monaco.editor {
selectionClipboard: IEditorOption<EditorOption.selectionClipboard, boolean>;
selectionHighlight: IEditorOption<EditorOption.selectionHighlight, boolean>;
selectOnLineNumbers: IEditorOption<EditorOption.selectOnLineNumbers, boolean>;
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'mouseover'>;
showFoldingControls: IEditorOption<EditorOption.showFoldingControls, 'always' | 'never' | 'mouseover'>;
showUnused: IEditorOption<EditorOption.showUnused, boolean>;
showDeprecated: IEditorOption<EditorOption.showDeprecated, boolean>;
inlayHints: IEditorOption<EditorOption.inlayHints, Readonly<Required<IEditorInlayHintsOptions>>>;
@ -4448,7 +4560,7 @@ declare namespace monaco.editor {
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
tabIndex: IEditorOption<EditorOption.tabIndex, number>;
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, Required<Readonly<IUnicodeHighlightOptions>>>;
unicodeHighlight: IEditorOption<EditorOption.unicodeHighlighting, any>;
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
useShadowDOM: IEditorOption<EditorOption.useShadowDOM, boolean>;
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
@ -4609,6 +4721,11 @@ declare namespace monaco.editor {
* Placement preference for position, in order of preference.
*/
preference: ContentWidgetPositionPreference[];
/**
* Placement preference when multiple view positions refer to the same (model) position.
* This plays a role when injected text is involved.
*/
positionAffinity?: PositionAffinity;
}
/**
@ -5069,7 +5186,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: ICodeEditorViewState): void;
restoreViewState(state: ICodeEditorViewState | null): void;
/**
* Returns true if the text inside this editor or an editor widget has focus.
*/
@ -5201,9 +5318,13 @@ declare namespace monaco.editor {
getDecorationsInRange(range: Range): IModelDecoration[] | null;
/**
* All decorations added through this call will get the ownerId of this editor.
* @see {@link ITextModel.deltaDecorations}
* @deprecated
*/
deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[];
/**
* Remove previously added decorations.
*/
removeDecorations(decorationIds: string[]): void;
/**
* Get the layout info for the editor.
*/
@ -5322,7 +5443,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IDiffEditorViewState): void;
restoreViewState(state: IDiffEditorViewState | null): void;
/**
* Type the getModel() of IEditor.
*/
@ -5396,6 +5517,34 @@ declare namespace monaco.editor {
declare namespace monaco.languages {
export interface IRelativePattern {
/**
* A base file path to which this pattern will be matched against relatively.
*/
readonly base: string;
/**
* A file glob pattern like `*.{ts,js}` that will be matched on file paths
* relative to the base path.
*
* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,
* the file glob pattern will match on `index.js`.
*/
readonly pattern: string;
}
export type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
export interface LanguageFilter {
readonly language?: string;
readonly scheme?: string;
readonly pattern?: string | IRelativePattern;
readonly notebookType?: string;
/**
* This provider is implemented in the UI thread.
*/
readonly hasAccessToAllModels?: boolean;
readonly exclusive?: boolean;
}
/**
* Register information about a new language.
@ -5546,107 +5695,107 @@ declare namespace monaco.languages {
/**
* Register a reference provider (used by e.g. reference search).
*/
export function registerReferenceProvider(languageId: string, provider: ReferenceProvider): IDisposable;
export function registerReferenceProvider(languageSelector: LanguageSelector, provider: ReferenceProvider): IDisposable;
/**
* Register a rename provider (used by e.g. rename symbol).
*/
export function registerRenameProvider(languageId: string, provider: RenameProvider): IDisposable;
export function registerRenameProvider(languageSelector: LanguageSelector, provider: RenameProvider): IDisposable;
/**
* Register a signature help provider (used by e.g. parameter hints).
*/
export function registerSignatureHelpProvider(languageId: string, provider: SignatureHelpProvider): IDisposable;
export function registerSignatureHelpProvider(languageSelector: LanguageSelector, provider: SignatureHelpProvider): IDisposable;
/**
* Register a hover provider (used by e.g. editor hover).
*/
export function registerHoverProvider(languageId: string, provider: HoverProvider): IDisposable;
export function registerHoverProvider(languageSelector: LanguageSelector, provider: HoverProvider): IDisposable;
/**
* Register a document symbol provider (used by e.g. outline).
*/
export function registerDocumentSymbolProvider(languageId: string, provider: DocumentSymbolProvider): IDisposable;
export function registerDocumentSymbolProvider(languageSelector: LanguageSelector, provider: DocumentSymbolProvider): IDisposable;
/**
* Register a document highlight provider (used by e.g. highlight occurrences).
*/
export function registerDocumentHighlightProvider(languageId: string, provider: DocumentHighlightProvider): IDisposable;
export function registerDocumentHighlightProvider(languageSelector: LanguageSelector, provider: DocumentHighlightProvider): IDisposable;
/**
* Register an linked editing range provider.
*/
export function registerLinkedEditingRangeProvider(languageId: string, provider: LinkedEditingRangeProvider): IDisposable;
export function registerLinkedEditingRangeProvider(languageSelector: LanguageSelector, provider: LinkedEditingRangeProvider): IDisposable;
/**
* Register a definition provider (used by e.g. go to definition).
*/
export function registerDefinitionProvider(languageId: string, provider: DefinitionProvider): IDisposable;
export function registerDefinitionProvider(languageSelector: LanguageSelector, provider: DefinitionProvider): IDisposable;
/**
* Register a implementation provider (used by e.g. go to implementation).
*/
export function registerImplementationProvider(languageId: string, provider: ImplementationProvider): IDisposable;
export function registerImplementationProvider(languageSelector: LanguageSelector, provider: ImplementationProvider): IDisposable;
/**
* Register a type definition provider (used by e.g. go to type definition).
*/
export function registerTypeDefinitionProvider(languageId: string, provider: TypeDefinitionProvider): IDisposable;
export function registerTypeDefinitionProvider(languageSelector: LanguageSelector, provider: TypeDefinitionProvider): IDisposable;
/**
* Register a code lens provider (used by e.g. inline code lenses).
*/
export function registerCodeLensProvider(languageId: string, provider: CodeLensProvider): IDisposable;
export function registerCodeLensProvider(languageSelector: LanguageSelector, provider: CodeLensProvider): IDisposable;
/**
* Register a code action provider (used by e.g. quick fix).
*/
export function registerCodeActionProvider(languageId: string, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
export function registerCodeActionProvider(languageSelector: LanguageSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): IDisposable;
/**
* Register a formatter that can handle only entire models.
*/
export function registerDocumentFormattingEditProvider(languageId: string, provider: DocumentFormattingEditProvider): IDisposable;
export function registerDocumentFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentFormattingEditProvider): IDisposable;
/**
* Register a formatter that can handle a range inside a model.
*/
export function registerDocumentRangeFormattingEditProvider(languageId: string, provider: DocumentRangeFormattingEditProvider): IDisposable;
export function registerDocumentRangeFormattingEditProvider(languageSelector: LanguageSelector, provider: DocumentRangeFormattingEditProvider): IDisposable;
/**
* Register a formatter than can do formatting as the user types.
*/
export function registerOnTypeFormattingEditProvider(languageId: string, provider: OnTypeFormattingEditProvider): IDisposable;
export function registerOnTypeFormattingEditProvider(languageSelector: LanguageSelector, provider: OnTypeFormattingEditProvider): IDisposable;
/**
* Register a link provider that can find links in text.
*/
export function registerLinkProvider(languageId: string, provider: LinkProvider): IDisposable;
export function registerLinkProvider(languageSelector: LanguageSelector, provider: LinkProvider): IDisposable;
/**
* Register a completion item provider (use by e.g. suggestions).
*/
export function registerCompletionItemProvider(languageId: string, provider: CompletionItemProvider): IDisposable;
export function registerCompletionItemProvider(languageSelector: LanguageSelector, provider: CompletionItemProvider): IDisposable;
/**
* Register a document color provider (used by Color Picker, Color Decorator).
*/
export function registerColorProvider(languageId: string, provider: DocumentColorProvider): IDisposable;
export function registerColorProvider(languageSelector: LanguageSelector, provider: DocumentColorProvider): IDisposable;
/**
* Register a folding range provider
*/
export function registerFoldingRangeProvider(languageId: string, provider: FoldingRangeProvider): IDisposable;
export function registerFoldingRangeProvider(languageSelector: LanguageSelector, provider: FoldingRangeProvider): IDisposable;
/**
* Register a declaration provider
*/
export function registerDeclarationProvider(languageId: string, provider: DeclarationProvider): IDisposable;
export function registerDeclarationProvider(languageSelector: LanguageSelector, provider: DeclarationProvider): IDisposable;
/**
* Register a selection range provider
*/
export function registerSelectionRangeProvider(languageId: string, provider: SelectionRangeProvider): IDisposable;
export function registerSelectionRangeProvider(languageSelector: LanguageSelector, provider: SelectionRangeProvider): IDisposable;
/**
* Register a document semantic tokens provider. A semantic tokens provider will complement and enhance a
@ -5655,7 +5804,7 @@ declare namespace monaco.languages {
*
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
*/
export function registerDocumentSemanticTokensProvider(languageId: string, provider: DocumentSemanticTokensProvider): IDisposable;
export function registerDocumentSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentSemanticTokensProvider): IDisposable;
/**
* Register a document range semantic tokens provider. A semantic tokens provider will complement and enhance a
@ -5664,17 +5813,17 @@ declare namespace monaco.languages {
*
* For the best user experience, register both a semantic tokens provider and a top-down tokenizer.
*/
export function registerDocumentRangeSemanticTokensProvider(languageId: string, provider: DocumentRangeSemanticTokensProvider): IDisposable;
export function registerDocumentRangeSemanticTokensProvider(languageSelector: LanguageSelector, provider: DocumentRangeSemanticTokensProvider): IDisposable;
/**
* Register an inline completions provider.
*/
export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable;
export function registerInlineCompletionsProvider(languageSelector: LanguageSelector, provider: InlineCompletionsProvider): IDisposable;
/**
* Register an inlay hints provider.
*/
export function registerInlayHintsProvider(languageId: string, provider: InlayHintsProvider): IDisposable;
export function registerInlayHintsProvider(languageSelector: LanguageSelector, provider: InlayHintsProvider): IDisposable;
/**
* Contains additional diagnostic information about the context in which
@ -6230,8 +6379,24 @@ declare namespace monaco.languages {
* The text to insert.
* If the text contains a line break, the range must end at the end of a line.
* If existing text should be replaced, the existing text must be a prefix of the text to insert.
*
* The text can also be a snippet. In that case, a preview with default parameters is shown.
* When accepting the suggestion, the full snippet is inserted.
*/
readonly text: string;
readonly insertText: string | {
snippet: string;
};
/**
* A text that is used to decide if this inline completion should be shown.
* An inline completion is shown if the text to replace is a subword of the filter text.
*/
readonly filterText?: string;
/**
* An optional array of additional text edits that are applied when
* selecting this completion. Edits must not overlap with the main edit
* nor with themselves.
*/
readonly additionalTextEdits?: editor.ISingleEditOperation[];
/**
* The range to replace.
* Must begin and end on the same line.
@ -6247,6 +6412,10 @@ declare namespace monaco.languages {
export interface InlineCompletions<TItem extends InlineCompletion = InlineCompletion> {
readonly items: readonly TItem[];
/**
* A list of commands associated with the inline completions of this list.
*/
readonly commands?: Command[];
}
export interface InlineCompletionsProvider<T extends InlineCompletions = InlineCompletions> {
@ -6851,22 +7020,24 @@ declare namespace monaco.languages {
maxSize?: number;
}
export interface WorkspaceFileEdit {
oldUri?: Uri;
newUri?: Uri;
export interface IWorkspaceFileEdit {
oldResource?: Uri;
newResource?: Uri;
options?: WorkspaceFileEditOptions;
metadata?: WorkspaceEditMetadata;
}
export interface WorkspaceTextEdit {
export interface IWorkspaceTextEdit {
resource: Uri;
edit: TextEdit;
modelVersionId?: number;
textEdit: TextEdit & {
insertAsSnippet?: boolean;
};
versionId: number | undefined;
metadata?: WorkspaceEditMetadata;
}
export interface WorkspaceEdit {
edits: Array<WorkspaceTextEdit | WorkspaceFileEdit>;
edits: Array<IWorkspaceTextEdit | IWorkspaceFileEdit>;
}
export interface Rejection {
@ -6922,7 +7093,7 @@ declare namespace monaco.languages {
export interface InlayHint {
label: string | InlayHintLabelPart[];
tooltip?: string | IMarkdownString;
command?: Command;
textEdits?: TextEdit[];
position: IPosition;
kind?: InlayHintKind;
paddingLeft?: boolean;