diff --git a/src/index.ts b/src/index.ts index 7d572d5..1efcc94 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,7 @@ import { updateUserConfiguration, registerConfigurations, registerDefaultConfigu import { getMonacoLanguage, loadLanguage } from './languages' import { updateKeybindings, updateEditorKeybindingsMode } from './keybindings' import './style' +import { setUseGlobalPicker } from './services' export * from './tools' export { @@ -24,5 +25,6 @@ export { getMonacoLanguage, registerEditorOpenHandler, - loadLanguage + loadLanguage, + setUseGlobalPicker } diff --git a/src/services.ts b/src/services.ts index 4b28969..2dc7535 100644 --- a/src/services.ts +++ b/src/services.ts @@ -16,16 +16,19 @@ 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 { ILogService, LogLevel, StandaloneServices, initialize as initializeServices } from 'vscode/services' -import { initialize as initializeExtensions } from 'vscode/extensions' import * as monaco from 'monaco-editor' import EditorOpenHandlerRegistry from './tools/EditorOpenHandlerRegistry' const editorOpenHandlerRegistry = new EditorOpenHandlerRegistry() +let _useGlobalPicker: boolean = false +export function setUseGlobalPicker (useGlobalPicker: boolean = true): void { + _useGlobalPicker = useGlobalPicker +} export function useGlobalPicker (): boolean { - // TODO should picker and keybindings be global or per-editor - return false + // should picker and keybindings be global or per-editor + return _useGlobalPicker } let services: monaco.editor.IEditorOverrideServices = {