11import * as vscode from 'vscode'
22import lodash from 'lodash'
3+ import { getExtensionContributionsPrefix } from 'vscode-framework'
34import { Configuration } from './configurationType'
45
56const settingsToIgnore = [ ] as Array < keyof Configuration >
@@ -14,9 +15,10 @@ export const mergeSettingsFromScopes = (
1415 configuration : { properties } ,
1516 } ,
1617 } = packageJson
17- for ( const [ key , item ] of Object . entries ( properties ) ) {
18- const isObject = item . type !== 'object'
19- if ( ( isObject && item . type !== 'array' ) || settingsToIgnore . includes ( key as keyof Configuration ) ) {
18+ for ( const [ fullKey , item ] of Object . entries ( properties ) ) {
19+ const key = fullKey . slice ( getExtensionContributionsPrefix ( ) . length )
20+ const isObject = item . type === 'object'
21+ if ( ( ! isObject && item . type !== 'array' ) || settingsToIgnore . includes ( key as keyof Configuration ) ) {
2022 continue
2123 }
2224
@@ -28,7 +30,6 @@ export const mergeSettingsFromScopes = (
2830const getConfigValueFromAllScopes = < T extends keyof Configuration > ( configKey : T , language : string , type : 'array' | 'object' ) : Configuration [ T ] => {
2931 const values = { ...vscode . workspace . getConfiguration ( process . env . IDS_PREFIX , { languageId : language } ) . inspect < any [ ] > ( configKey ) ! }
3032 const userValueKeys = Object . keys ( values ) . filter ( key => key . endsWith ( 'Value' ) && ! key . startsWith ( 'default' ) )
31- console . log ( userValueKeys )
3233 for ( const key of userValueKeys ) {
3334 if ( values [ key ] !== undefined ) {
3435 continue
0 commit comments