diff --git a/package.json b/package.json index c074a70..6e92fd8 100644 --- a/package.json +++ b/package.json @@ -715,6 +715,11 @@ "default": null, "description": "The maximum number of global search (ie, Ctrl+P + #foo) search results to report. For small search strings on large projects there can be a massive number of results (ie, over 1,000,000) so this limit is important to avoid extremely long delays. null means use the default value provided by the cquery language server." }, + "cquery.misc.workspaceSymbolJustMyCode": { + "type": "boolean", + "default": true, + "description": "If true, non workspace symbols are filtered from workspace symbols." + }, "cquery.misc.indexerCount": { "type": "number", "default": 0, @@ -866,4 +871,4 @@ "type": "git", "url": "https://github.com/cquery-project/vscode-cquery.git" } -} +} \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 0c71df2..c3de0c3 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -134,6 +134,7 @@ function getClientConfig(context: ExtensionContext) { ['extraClangArguments', 'index.extraClangArguments'], ['resourceDirectory', 'misc.resourceDirectory'], ['workspaceSymbol.maxNum', 'misc.maxWorkspaceSearchResults'], + ['workspaceSymbol.justMyCode', 'misc.workspaceSymbolJustMyCode'], ['index.threads', 'misc.indexerCount'], ['index.enabled', 'misc.enableIndexing'], ['enableCacheWrite', 'misc.enableCacheWrite'], @@ -180,6 +181,11 @@ function getClientConfig(context: ExtensionContext) { } } + // Gather workspaceFolder paths in current workspace. + clientConfig["workspaceFolders"] = workspace.workspaceFolders.map(workspaceFolder => { + return workspaceFolder.uri.path; + }); + // Set up a cache directory if there is not one. if (!clientConfig.cacheDirectory) { if (!context.storagePath) {