diff --git a/packages/plugin-ext/src/plugin/preference-registry.ts b/packages/plugin-ext/src/plugin/preference-registry.ts index 275883fe8d924..63cc7efa4ecb9 100644 --- a/packages/plugin-ext/src/plugin/preference-registry.ts +++ b/packages/plugin-ext/src/plugin/preference-registry.ts @@ -170,7 +170,9 @@ export class PreferenceRegistryExtImpl implements PreferenceRegistryExt { }, update: (key: string, value: any, targetScope?: ConfigurationTarget | boolean, withLanguageOverride?: boolean): PromiseLike => { const resourceStr = overrides.resource?.toString(); - const fullPath = `${overrides.overrideIdentifier ? `[${overrides.overrideIdentifier}].` : ''}${rawSection}.${key}`; + const overrideSegment = overrides.overrideIdentifier ? `[${overrides.overrideIdentifier}].` : ''; + const preferenceKey = rawSection ? `${rawSection}.${key}` : key; + const fullPath = overrideSegment + preferenceKey; if (typeof value !== 'undefined') { return this.proxy.$updateConfigurationOption(targetScope, fullPath, value, resourceStr, withLanguageOverride); } else { @@ -178,7 +180,7 @@ export class PreferenceRegistryExtImpl implements PreferenceRegistryExt { } }, inspect: (key: string): ConfigurationInspect | undefined => { - const path = `${rawSection}.${key}`; + const path = rawSection ? `${rawSection}.${key}` : key; const result = this._preferences.inspect(path, overrides, new TheiaWorkspace(this.workspace)); if (!result) {