@@ -4,7 +4,7 @@ import * as path from "path";
44import * as vscode from "vscode" ;
55import { expectNotUndefined , log , normalizeDriveLetter , unwrapUndefinable } from "./util" ;
66import type { Env } from "./util" ;
7- import { cloneDeep , get , merge , pickBy } from "lodash" ;
7+ import { cloneDeep , get , pickBy , set } from "lodash" ;
88
99export type RunnableEnvCfgItem = {
1010 mask ?: string ;
@@ -220,7 +220,19 @@ export class Config {
220220
221221 // Returns the final configuration to use, with extension configuration overrides merged in.
222222 public get cfg ( ) : ConfigurationTree {
223- return merge ( cloneDeep ( this . rawCfg ) , ...Object . values ( this . extensionConfigurations ) ) ;
223+ const finalConfig = cloneDeep < ConfigurationTree > ( this . rawCfg ) ;
224+ for ( const [ extensionId , items ] of Object . entries ( this . extensionConfigurations ) ) {
225+ for ( const [ k , v ] of Object . entries ( items ) ) {
226+ const i = this . rawCfg . inspect ( k ) ;
227+ if ( i ?. workspaceValue !== undefined || i ?. workspaceFolderValue !== undefined || i ?. globalValue !== undefined ) {
228+ log . trace ( `Ignoring configuration override for ${ k } from extension ${ extensionId } ` ) ;
229+ continue ;
230+ }
231+ log . trace ( `Extension ${ extensionId } overrides configuration ${ k } to ` , v ) ;
232+ set ( finalConfig , k , v ) ;
233+ }
234+ }
235+ return finalConfig ;
224236 }
225237
226238 /**
0 commit comments