@@ -97,43 +97,49 @@ function getClientConfig(context: ExtensionContext) {
97
97
[ 'launchCommand' , 'launch.command' ] ,
98
98
[ 'launchArgs' , 'launch.args' ] ,
99
99
[ 'cacheDirectory' , kCacheDirPrefName ] ,
100
- [ 'indexWhitelist' , 'index.whitelist' ] ,
101
- [ 'indexBlacklist' , 'index.blacklist' ] ,
100
+ [ 'index.whitelist' , 'index.whitelist' ] ,
101
+ [ 'index.blacklist' , 'index.blacklist' ] ,
102
+ [ 'index.logSkippedPaths' , 'log.skippedPathsForIndex' ] ,
102
103
[ 'extraClangArguments' , 'index.extraClangArguments' ] ,
103
104
[ 'resourceDirectory' , 'misc.resourceDirectory' ] ,
104
- [ 'maxWorkspaceSearchResults ' , 'misc.maxWorkspaceSearchResults' ] ,
105
- [ 'indexerCount ' , 'misc.indexerCount' ] ,
106
- [ 'enableIndexing ' , 'misc.enableIndexing' ] ,
105
+ [ 'workspaceSymbol.maxNum ' , 'misc.maxWorkspaceSearchResults' ] ,
106
+ [ 'index.threads ' , 'misc.indexerCount' ] ,
107
+ [ 'index.enabled ' , 'misc.enableIndexing' ] ,
107
108
[ 'enableCacheWrite' , 'misc.enableCacheWrite' ] ,
108
109
[ 'enableCacheRead' , 'misc.enableCacheRead' ] ,
109
110
[ 'compilationDatabaseDirectory' , 'misc.compilationDatabaseDirectory' ] ,
110
- [
111
- 'includeCompletionMaximumPathLength' ,
112
- 'completion.include.maximumPathLength'
113
- ] ,
114
- [
115
- 'includeCompletionWhitelistLiteralEnding' ,
116
- 'completion.include.whitelistLiteralEnding'
117
- ] ,
118
- [ 'includeCompletionWhitelist' , 'completion.include.whitelist' ] ,
119
- [ 'includeCompletionBlacklist' , 'completion.include.blacklist' ] ,
111
+ [ 'completion.includeMaxPathSize' , 'completion.include.maximumPathLength' ] ,
112
+ [ 'completion.includeSuffixWhitelist' , 'completion.include.whitelistLiteralEnding' ] ,
113
+ [ 'completion.includeWhitelist' , 'completion.include.whitelist' ] ,
114
+ [ 'completion.includeBlacklist' , 'completion.include.blacklist' ] ,
120
115
[ 'showDocumentLinksOnIncludes' , 'showDocumentLinksOnIncludes' ] ,
121
- [ 'diagnosticsOnParse ' , 'diagnostics.onParse' ] ,
122
- [ 'diagnosticsOnCodeCompletion ' , 'diagnostics.onCodeCompletion' ] ,
123
- [ 'codeLensOnLocalVariables ' , 'codeLens.onLocalVariables' ] ,
124
- [ 'enableSnippetInsertion ' , 'completion.enableSnippetInsertion' ]
116
+ [ 'diagnostics.onParse ' , 'diagnostics.onParse' ] ,
117
+ [ 'diagnostics.onCodeCompletion ' , 'diagnostics.onCodeCompletion' ] ,
118
+ [ 'codeLens.localVariables ' , 'codeLens.onLocalVariables' ] ,
119
+ [ 'client.snippetSupport ' , 'completion.enableSnippetInsertion' ]
125
120
] ;
126
121
let clientConfig = {
127
122
launchWorkingDirectory : '' ,
128
123
launchCommand : '' ,
129
124
cacheDirectory : '' ,
130
- sortWorkspaceSearchResults : false
125
+ workspaceSymbol : {
126
+ sort : false ,
127
+ }
131
128
} ;
132
129
let config = workspace . getConfiguration ( 'cquery' ) ;
133
130
for ( let prop of configMapping ) {
134
131
let value = config . get ( prop [ 1 ] ) ;
135
- if ( value != null )
136
- clientConfig [ prop [ 0 ] ] = value ;
132
+ if ( value != null ) {
133
+ let subprops = prop [ 0 ] . split ( '.' ) ;
134
+ let subconfig = clientConfig ;
135
+ for ( let subprop of subprops . slice ( 0 , subprops . length - 1 ) ) {
136
+ if ( ! subconfig . hasOwnProperty ( subprop ) ) {
137
+ subconfig [ subprop ] = { } ;
138
+ }
139
+ subconfig = subconfig [ subprop ] ;
140
+ }
141
+ subconfig [ subprops [ subprops . length - 1 ] ] = value ;
142
+ }
137
143
}
138
144
139
145
// Verify that there is a working directory. If not, exit.
0 commit comments