Skip to content

Commit

Permalink
feat: extension gallery & installation support
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves committed Nov 11, 2023
1 parent 36230de commit b3e0e4c
Show file tree
Hide file tree
Showing 16 changed files with 741 additions and 165 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"eslint.codeAction.showDocumentation": {
"enable": true
},
"[typescript]": {
"editor.defaultFormatter": null
},
"eslint.validate": [
"javascript",
"typescript"
Expand Down
14 changes: 14 additions & 0 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@codingame/monaco-vscode-editor-service-override": "file:../dist/service-override-editor",
"@codingame/monaco-vscode-emmet-default-extension": "file:../dist/default-extension-emmet",
"@codingame/monaco-vscode-environment-service-override": "file:../dist/service-override-environment",
"@codingame/monaco-vscode-extension-gallery-service-override": "file:../dist/service-override-extension-gallery",
"@codingame/monaco-vscode-extension-editing-default-extension": "file:../dist/default-extension-extension-editing",
"@codingame/monaco-vscode-extensions-service-override": "file:../dist/service-override-extensions",
"@codingame/monaco-vscode-files-service-override": "file:../dist/service-override-files",
Expand Down
15 changes: 14 additions & 1 deletion demo/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import getTextmateServiceOverride from '@codingame/monaco-vscode-textmate-servic
import getThemeServiceOverride from '@codingame/monaco-vscode-theme-service-override'
import getLanguagesServiceOverride from '@codingame/monaco-vscode-languages-service-override'
import getAudioCueServiceOverride from '@codingame/monaco-vscode-audio-cue-service-override'
import getExtensionGalleryServiceOverride from '@codingame/monaco-vscode-extension-gallery-service-override'
import getViewsServiceOverride, {
isEditorPartVisible,
Parts,
Expand Down Expand Up @@ -104,6 +105,7 @@ await Promise.all([
// Override services
await initializeMonacoService({
...getExtensionServiceOverride(toWorkerConfig(ExtensionHostWorker)),
...getExtensionGalleryServiceOverride(),
...getModelServiceOverride(),
...getNotificationServiceOverride(),
...getDialogsServiceOverride(),
Expand Down Expand Up @@ -137,7 +139,18 @@ await initializeMonacoService({
...getLifecycleServiceOverride(),
...getEnvironmentServiceOverride({
remoteAuthority,
enableWorkspaceTrust: true
enableWorkspaceTrust: true,
productConfiguration: {
extensionsGallery: {
serviceUrl: 'https://open-vsx.org/vscode/gallery',
itemUrl: 'https://open-vsx.org/vscode/item',
resourceUrlTemplate: 'https://open-vsx.org/vscode/unpkg/{publisher}/{name}/{version}/{path}',
controlUrl: '',
recommendationsUrl: '',
nlsBaseUrl: '',
publisherUrl: ''
}
}
}),
...getWorkspaceTrustOverride()
})
Expand Down
Loading

0 comments on commit b3e0e4c

Please sign in to comment.