diff --git a/package.json b/package.json index 3e8992bfad..3cc92e74fc 100644 --- a/package.json +++ b/package.json @@ -626,6 +626,11 @@ "default": true, "description": "Displays a code lens above function definitions showing the number of times the function is referenced in the workspace. Large workspaces should disable this setting due to high performance impact." }, + "powershell.analyzeOpenDocumentsOnly": { + "type": "boolean", + "default": false, + "description": "Only search for references within open documents. Enable this in large workspaces if memory is limited." + }, "powershell.bugReporting.project": { "type": "string", "default": "https://github.com/PowerShell/vscode-powershell", diff --git a/src/settings.ts b/src/settings.ts index 3405de1d77..8378d0437f 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -102,6 +102,7 @@ export interface ISettings { cwd?: string; notebooks?: INotebooksSettings; enableReferencesCodeLens?: boolean; + analyzeOpenDocumentsOnly?: boolean; } export interface IStartAsLoginShellSettings { @@ -273,6 +274,8 @@ export function load(): ISettings { configuration.get("cwd", undefined), enableReferencesCodeLens: configuration.get("enableReferencesCodeLens", true), + analyzeOpenDocumentsOnly: + configuration.get("analyzeOpenDocumentsOnly", true), }; }