Skip to content

Commit

Permalink
fix: prevent crashing by registering a configuration key
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Apr 12, 2023
1 parent 5f4e27a commit 637d20b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { StandaloneServices } from 'vs/editor/standalone/browser/standaloneServi
import { getExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'
import { IDisposable } from 'vs/base/common/lifecycle'
import Severity from 'vs/base/common/severity'
import { localize } from 'vs/nls'
import { Registry } from 'vs/platform/registry/common/platform'
import { ConfigurationScope, IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'
import * as api from './api'
import { registerExtensionFile } from './service-override/files'
import createLanguagesApi from './vscode-services/languages'
Expand All @@ -32,6 +35,19 @@ export function consoleExtensionMessageHandler (msg: IMessage): void {
}
}

// Required or it crashed on extensions with activationEvents
const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
configurationRegistry.registerConfiguration({
properties: {
'search.useIgnoreFiles': {
type: 'boolean',
markdownDescription: localize('useIgnoreFiles', 'Controls whether to use `.gitignore` and `.ignore` files when searching for files.'),
default: true,
scope: ConfigurationScope.RESOURCE
}
}
})

let DEFAULT_EXTENSION: IExtensionDescription = {
identifier: new ExtensionIdentifier('monaco'),
isBuiltin: true,
Expand Down

0 comments on commit 637d20b

Please sign in to comment.