diff --git a/src/vs/workbench/api/browser/mainThreadConfiguration.ts b/src/vs/workbench/api/browser/mainThreadConfiguration.ts index 21397e56218..5c1dd842f6d 100644 --- a/src/vs/workbench/api/browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/browser/mainThreadConfiguration.ts @@ -60,15 +60,15 @@ export class MainThreadConfiguration implements MainThreadConfigurationShape { const configurationValue = this.configurationService.inspect(key, overrides); switch (target) { case ConfigurationTarget.MEMORY: - return this._updateValue(key, value, target, configurationValue.memory?.override, overrides, scopeToLanguage); + return this._updateValue(key, value, target, configurationValue?.memory?.override, overrides, scopeToLanguage); case ConfigurationTarget.WORKSPACE_FOLDER: - return this._updateValue(key, value, target, configurationValue.workspaceFolder?.override, overrides, scopeToLanguage); + return this._updateValue(key, value, target, configurationValue?.workspaceFolder?.override, overrides, scopeToLanguage); case ConfigurationTarget.WORKSPACE: - return this._updateValue(key, value, target, configurationValue.workspace?.override, overrides, scopeToLanguage); + return this._updateValue(key, value, target, configurationValue?.workspace?.override, overrides, scopeToLanguage); case ConfigurationTarget.USER_REMOTE: - return this._updateValue(key, value, target, configurationValue.userRemote?.override, overrides, scopeToLanguage); + return this._updateValue(key, value, target, configurationValue?.userRemote?.override, overrides, scopeToLanguage); default: - return this._updateValue(key, value, target, configurationValue.userLocal?.override, overrides, scopeToLanguage); + return this._updateValue(key, value, target, configurationValue?.userLocal?.override, overrides, scopeToLanguage); } } diff --git a/src/vs/workbench/api/common/extHostConfiguration.ts b/src/vs/workbench/api/common/extHostConfiguration.ts index 6d875cca104..e03262a0b51 100644 --- a/src/vs/workbench/api/common/extHostConfiguration.ts +++ b/src/vs/workbench/api/common/extHostConfiguration.ts @@ -34,10 +34,16 @@ function lookUp(tree: any, key: string) { type ConfigurationInspect = { key: string; + defaultValue?: T; globalValue?: T; - workspaceValue?: T; - workspaceFolderValue?: T; + workspaceValue?: T, + workspaceFolderValue?: T, + + defaultLanguageValue?: T; + userLanguageValue?: T; + workspaceLanguageValue?: T; + workspaceFolderLanguageValue?: T; }; function isTextDocument(thing: any): thing is vscode.TextDocument { @@ -54,8 +60,7 @@ function isWorkspaceFolder(thing: any): thing is vscode.WorkspaceFolder { } function isUri(thing: any): thing is vscode.Uri { - return thing - && thing.uri instanceof URI; + return thing instanceof URI; } function isResourceLanguage(thing: any): thing is { resource: URI, languageId: string } { @@ -245,10 +250,16 @@ export class ExtHostConfigProvider { if (config) { return { key, + defaultValue: config.defaultValue, globalValue: config.userValue, workspaceValue: config.workspaceValue, - workspaceFolderValue: config.workspaceFolderValue + workspaceFolderValue: config.workspaceFolderValue, + + defaultLanguageValue: config.default?.override, + userLanguageValue: config.user?.override, + workspaceLanguageValue: config.workspace?.override, + workspaceFolderLanguageValue: config.workspaceFolder?.override, }; } return undefined;