diff --git a/package.json b/package.json index ff5f049..2691bfc 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,38 @@ "exports": { ".": { "default": "./dist/main.js" + }, + "./features/views": { + "types": "./dist/features/views.d.ts", + "default": "./dist/features/views.js" + }, + "./features/viewPanels": { + "types": "./dist/features/viewPanels.d.ts", + "default": "./dist/features/viewPanels.js" + }, + "./features/debug": { + "types": "./dist/features/debug.d.ts", + "default": "./dist/features/debug.js" + }, + "./features/search": { + "types": "./dist/features/search.d.ts", + "default": "./dist/features/search.js" + } + }, + "typesVersions": { + "*": { + "features/views": [ + "./dist/features/views.d.ts" + ], + "features/viewPanels": [ + "./dist/features/viewPanels.d.ts" + ], + "features/debug": [ + "./dist/features/debug.d.ts" + ], + "features/search": [ + "./dist/features/search.d.ts" + ] } }, "files": [ diff --git a/rollup.config.ts b/rollup.config.ts index f3d847e..a2d5b35 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -17,7 +17,11 @@ const extensions = ['.js', '.ts'] export default rollup.defineConfig({ cache: false, input: { - main: 'src/index.ts' + main: 'src/index.ts', + 'features/views': 'src/features/views.ts', + 'features/viewPanels': 'src/features/viewPanels.ts', + 'features/search': 'src/features/search.ts', + 'features/debug': 'src/features/debug.ts' }, external: function isExternal (source, importer, isResolved) { if (isResolved) { diff --git a/src/features/debug.ts b/src/features/debug.ts new file mode 100644 index 0000000..284c05b --- /dev/null +++ b/src/features/debug.ts @@ -0,0 +1,6 @@ +import getDebugServiceOverride from '@codingame/monaco-vscode-debug-service-override' +import { registerServices } from '../services' + +registerServices({ + ...getDebugServiceOverride() +}) diff --git a/src/features/search.ts b/src/features/search.ts new file mode 100644 index 0000000..0a0e09a --- /dev/null +++ b/src/features/search.ts @@ -0,0 +1,8 @@ +import getSearchServiceOverride from '@codingame/monaco-vscode-search-service-override' +import { registerServices } from '../services' + +import '@codingame/monaco-vscode-search-result-default-extension' + +registerServices({ + ...getSearchServiceOverride() +}) diff --git a/src/features/viewPanels.ts b/src/features/viewPanels.ts new file mode 100644 index 0000000..206195a --- /dev/null +++ b/src/features/viewPanels.ts @@ -0,0 +1,12 @@ +import getMarkersServiceOverride from '@codingame/monaco-vscode-markers-service-override' +import getOutputServiceOverride from '@codingame/monaco-vscode-output-service-override' +import { registerServices } from '../services' +import { registerWorkerLoader } from '../worker' +import '@codingame/monaco-vscode-references-view-default-extension' + +registerWorkerLoader('outputLinkComputer', () => new Worker(new URL('@codingame/monaco-vscode-output-service-override/worker', import.meta.url))) + +registerServices({ + ...getOutputServiceOverride(), + ...getMarkersServiceOverride() +}) diff --git a/src/features/views.ts b/src/features/views.ts new file mode 100644 index 0000000..fa70f79 --- /dev/null +++ b/src/features/views.ts @@ -0,0 +1,28 @@ +import getViewsServiceOverride from '@codingame/monaco-vscode-views-service-override' +import getOutputServiceOverride from '@codingame/monaco-vscode-output-service-override' +import getStatusBarServiceOverride from '@codingame/monaco-vscode-view-status-bar-service-override' +import getMarkersServiceOverride from '@codingame/monaco-vscode-markers-service-override' +import getQuickAccessServiceOverride from '@codingame/monaco-vscode-quickaccess-service-override' +import { editorOpenHandlerRegistry, registerServices, useGlobalPicker } from '../services' + +import '@codingame/monaco-vscode-theme-seti-default-extension' +import '@codingame/monaco-vscode-media-preview-default-extension' +import '@codingame/monaco-vscode-markdown-language-features-default-extension' +import '@codingame/monaco-vscode-markdown-math-default-extension' + +registerServices({ + ...getViewsServiceOverride((model, input, sideBySide) => { + return editorOpenHandlerRegistry.openCodeEditor(model, input, sideBySide) + }), + ...getOutputServiceOverride(), + ...getStatusBarServiceOverride(), + ...getMarkersServiceOverride(), + ...getQuickAccessServiceOverride({ + shouldUseGlobalPicker () { + return useGlobalPicker() + }, + isKeybindingConfigurationVisible () { + return true + } + }) +})