Skip to content

Commit

Permalink
feat: split working copy service
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jul 11, 2024
1 parent 23db945 commit 13b7ad2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ There are some optional features that can be enabled by importing a specific exp
- `@codingame/monaco-editor-wrapper/features/extensionHostWorker` enables the worker extension host which allows to run VSCode extensions
- `@codingame/monaco-editor-wrapper/features/notifications` enables the VSCode notifications instead of logging into the console
- `@codingame/monaco-editor-wrapper/features/workbench` allows to use the full VSCode workbench
- `@codingame/monaco-editor-wrapper/features/typescriptStandalone` enables the monaco standalone typescript language feature worker

Those feature can be used in the workbench feature is enabled:
Those feature can be used if the workbench feature is enabled:
- `@codingame/monaco-editor-wrapper/features/viewPanels` enables a few panels (timeline, outline, output, markers, explorer)
- `@codingame/monaco-editor-wrapper/features/search` enables the search panel
- `@codingame/monaco-editor-wrapper/features/extensionGallery` enables the extension gallery panel and the possibility to install extensions from the marketplace
- `@codingame/monaco-editor-wrapper/features/terminal` enables the terminal panel
- `@codingame/monaco-editor-wrapper/features/testing` enables the testing panels
- `@codingame/monaco-editor-wrapper/features/typescriptStandalone` enables the monaco standalone typescript language feature worker

### Embed language IntelliSense

Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
"./features/typescriptStandalone": {
"types": "./dist/features/typescriptStandalone.d.ts",
"default": "./dist/features/typescriptStandalone.js"
},
"./features/workingCopy": {
"types": "./dist/features/workingCopy.d.ts",
"default": "./dist/features/workingCopy.js"
}
},
"typesVersions": {
Expand Down Expand Up @@ -107,6 +111,9 @@
],
"features/typescriptStandalone": [
"./dist/features/typescriptStandalone.d.ts"
],
"features/workingCopy": [
"./dist/features/workingCopy.d.ts"
]
}
},
Expand Down
3 changes: 2 additions & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default rollup.defineConfig({
'features/extensionGallery': 'src/features/extensionGallery.ts',
'features/workbench': 'src/features/workbench.ts',
'features/profile': 'src/features/profile.ts',
'features/typescriptStandalone': 'src/features/typescriptStandalone.ts'
'features/typescriptStandalone': 'src/features/typescriptStandalone.ts',
'features/workingCopy': 'src/features/workingCopy.ts'
},
output: [{
dir: 'dist',
Expand Down
6 changes: 6 additions & 0 deletions src/features/workingCopy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy-service-override'
import { registerServices } from '../services'

registerServices({
...getWorkingCopyServiceOverride()
})
2 changes: 0 additions & 2 deletions src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import getStorageServiceOverride from '@codingame/monaco-vscode-storage-service-
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 getEmmetServiceOverride from '@codingame/monaco-vscode-emmet-service-override'
import { initialize as initializeServices } from 'vscode/services'
import * as monaco from 'monaco-editor'
Expand Down Expand Up @@ -85,7 +84,6 @@ let services: monaco.editor.IEditorOverrideServices = {
return useGlobalPicker()
}
}),
...getWorkingCopyServiceOverride(),
...getEmmetServiceOverride()
}

Expand Down

0 comments on commit 13b7ad2

Please sign in to comment.