Skip to content

Commit

Permalink
feat: add missing service overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jan 31, 2024
1 parent 69de554 commit 667f381
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 7 deletions.
189 changes: 184 additions & 5 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"@codingame/monaco-vscode-language-detection-worker-service-override": "~2.0.0",
"@codingame/monaco-vscode-languages-service-override": "~2.0.0",
"@codingame/monaco-vscode-lifecycle-service-override": "~2.0.0",
"@codingame/monaco-vscode-log-service-override": "^2.0.1",
"@codingame/monaco-vscode-lua-default-extension": "~2.0.0",
"@codingame/monaco-vscode-markdown-basics-default-extension": "~2.0.0",
"@codingame/monaco-vscode-markdown-language-features-default-extension": "~2.0.0",
Expand Down Expand Up @@ -130,6 +131,7 @@
"@codingame/monaco-vscode-vb-default-extension": "~2.0.0",
"@codingame/monaco-vscode-view-status-bar-service-override": "~2.0.0",
"@codingame/monaco-vscode-views-service-override": "~2.0.0",
"@codingame/monaco-vscode-working-copy-service-override": "^2.0.1",
"@codingame/monaco-vscode-xml-default-extension": "~2.0.0",
"@codingame/monaco-vscode-yaml-default-extension": "~2.0.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~2.0.0",
Expand Down Expand Up @@ -198,4 +200,4 @@
"rollup": "4.9.6",
"typescript": "5.3.3"
}
}
}
6 changes: 5 additions & 1 deletion src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-ov
import getStorageServiceOverride from '@codingame/monaco-vscode-storage-service-override'
import getLifecycleServiceOverride from '@codingame/monaco-vscode-lifecycle-service-override'
import getQuickAccessServiceOverride from '@codingame/monaco-vscode-quickaccess-service-override'
import getLogServiceOverride from '@codingame/monaco-vscode-log-service-override'
import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy-service-override'
import { ILogService, LogLevel, StandaloneServices, initialize as initializeServices } from 'vscode/services'
import * as monaco from 'monaco-editor'
import { initFile } from '@codingame/monaco-vscode-files-service-override'
Expand All @@ -34,6 +36,7 @@ export function useGlobalPicker (): boolean {
}

let services: monaco.editor.IEditorOverrideServices = {
...getLogServiceOverride(),
...getExtensionServiceOverride(),
...getModelServiceOverride(),
...getDialogsServiceOverride(),
Expand All @@ -60,7 +63,8 @@ let services: monaco.editor.IEditorOverrideServices = {
shouldUseGlobalPicker () {
return useGlobalPicker()
}
})
}),
...getWorkingCopyServiceOverride()
}

export function registerServices (newServices: monaco.editor.IEditorOverrideServices): void {
Expand Down

0 comments on commit 667f381

Please sign in to comment.